是通过style里面触发器的形式设置他floating的 例如- <Grid x:Name="DockGrid">
- <c1:C1DockControl>
- <c1:C1DockTabControl x:Name="CustomLogoTabControl" ShowSingleTab="False" ShowMenu="False"
- CanUserDock="False" CanUserHide="False" HeaderBackground="#1a1a1a" HeaderForeground="#FFFFFF"
- FontSize="14" CanUserReorder="False">
- <c1:C1DockTabControl.Style>
- <Style TargetType="c1:C1DockTabControl">
- <Setter Property="DockMode" Value="Hidden" />
- <Style.Triggers>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition
- Binding="{Binding Source={StaticResource Locator}, Path=VPro_Header.SelectConfigCtrl}"
- Value="CustomLogoPropertyWindow" />
- <Condition
- Binding="{Binding Source={StaticResource Locator},Path=VPro_Header.IsConfigMode}"
- Value="true" />
- </MultiDataTrigger.Conditions>
- <Setter Property="DockMode" Value="Floating" />
- <Setter Property="DockWidth"
- Value="{Binding Converter={StaticResource PropertyWindowWidthConverter}, ElementName=DockGrid, Path=ActualWidth}" />
- <Setter Property="HeaderBackground" Value="#1a1a1a"/>
- <Setter Property="HeaderForeground" Value="#FFFFFF"/>
- <Setter Property="FontSize" Value="14"/>
- </MultiDataTrigger>
- </Style.Triggers>
- </Style>
- </c1:C1DockTabControl.Style>
- <c1:C1TabItem x:Name="CustomLogoItem" Header="Properties">
- <config:CustomLogo />
- </c1:C1TabItem>
- </c1:C1DockTabControl>
- </c1:C1DockControl>
- </Grid>
复制代码
请问怎么才能让他floating的位置在grid的中央位置 现在每次出来的位置都貌似是随机的。。 |