gpt4 book ai didi

c# - 在dragablz :TabablzControl wpf mvvm的所有其他选项卡中显示的另一个选项卡中具有相似长度的文本框的虚线

转载 作者:行者123 更新时间:2023-12-03 10:12:37 24 4
gpt4 key购买 nike

我正在使用 dragablz:TabablzControl使用 material design.first 选项卡,我添加了文本框。但所有其他选项卡都存在与文本框长度相似的虚线。如何删除这条虚线。如果我使用普通选项卡控件,则不存在虚线。当我使用 dragablz:TabablzControl 时出现虚线
请看代码
MainWindow.xaml

<Window x:Class="WPFTabMenu.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WPFTabMenu"
mc:Ignorable="d"
xmlns:dragablz="clr-namespace:Dragablz;assembly=Dragablz"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
Title="CoreProgramm WPF TabMenu" Height="400" Width="880" ResizeMode="NoResize"
WindowStartupLocation="CenterScreen" WindowStyle="SingleBorderWindow" >
<Grid >
<Grid >
<dragablz:TabablzControl SelectedIndex="0"
FixedHeaderCount="4" >
<TabItem >
<TabItem.Header>
<materialDesign:PackIcon Kind="Home" Foreground="{DynamicResource PrimaryHueLightBrush}" />
</TabItem.Header>

<Grid >
<Grid.ColumnDefinitions >
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="100" />
<RowDefinition Height="100" />
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
<TextBox Name="TextBoxName" Width="200"
Text="Name"></TextBox>

</Grid>
</TabItem>

<TabItem Header="Customer details" Cursor="Hand" >

</TabItem>
<TabItem Header="Admin details" >

</TabItem>
<TabItem Header="Supplier details" >


</TabItem>

</dragablz:TabablzControl>
</Grid>
</Grid>
</Window>
App.xaml
  <Application x:Class="BIExtractionUtilityTool.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:BIExtractionUtilityTool"
xmlns:dragablz="clr-namespace:Dragablz;assembly=Dragablz"


xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
StartupUri="Views/MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!--primary color-->
<ResourceDictionary>
<!--include your primary palette-->
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/MaterialDesignColor.Blue.xaml" />
</ResourceDictionary.MergedDictionaries>

<!--include three hues from the primary palette (and the associated forecolours).
Do not rename, keep in sequence; light to dark.-->

<SolidColorBrush x:Key="PrimaryHueLightBrush" Color="{StaticResource Primary100}"/>
<SolidColorBrush x:Key="PrimaryHueLightForegroundBrush" Color="{StaticResource Primary100Foreground}"/>
<SolidColorBrush x:Key="PrimaryHueMidBrush" Color="{StaticResource Primary500}"/>
<SolidColorBrush x:Key="PrimaryHueMidForegroundBrush" Color="{StaticResource Primary500Foreground}"/>
<SolidColorBrush x:Key="PrimaryHueDarkBrush" Color="{StaticResource Primary700}"/>
<SolidColorBrush x:Key="PrimaryHueDarkForegroundBrush" Color="{StaticResource Primary700Foreground}"/>
</ResourceDictionary>

<!--secondary colour-->
<ResourceDictionary>
<!--include your secondary pallette-->
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/MaterialDesignColor.Blue.xaml" />
</ResourceDictionary.MergedDictionaries>


<!--include a single secondary accent color (and the associated forecolour)-->
<SolidColorBrush x:Key="SecondaryAccentBrush" Color="{StaticResource Accent200}"/>
<SolidColorBrush x:Key="SecondaryAccentForegroundBrush" Color="{StaticResource Accent200Foreground}"/>
</ResourceDictionary>

<!--Include the Dragablz Material Design style-->
<ResourceDictionary Source="pack://application:,,,/Dragablz;component/Themes/materialdesign.xaml"/>
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
</ResourceDictionary.MergedDictionaries>

<!--tell Dragablz tab control to use the Material Design theme-->
<Style TargetType="{x:Type dragablz:TabablzControl}" BasedOn="{StaticResource MaterialDesignTabablzControlStyle}" />
</ResourceDictionary>

</Application.Resources>
</Application>
虚线
enter image description here

最佳答案

尝试添加以下隐式 Style给您的 App.xaml或窗口:

<Style TargetType="materialDesign:BottomDashedLineAdorner">
<Setter Property="Visibility" Value="Collapsed" />
</Style>

关于c# - 在dragablz :TabablzControl wpf mvvm的所有其他选项卡中显示的另一个选项卡中具有相似长度的文本框的虚线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62760971/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com