Baymax
Baymax
CC#
Created by Baymax on 1/1/2024 in #help
WPF TabControl theme issue
When using this theme for tabs, the IsMouseOver trigger, triggered whenever you enter the whole space of the tab, I want it to be triggered just when its over the tab header.
<Style TargetType="TabItem">
<Setter Property="FontFamily" Value="{StaticResource ResourceFont}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabItem">
<Border Name="Border" BorderThickness="3,3,3,0" BorderBrush="Navy" Padding="5,1,5,2" CornerRadius="5,5,0,0" Margin="2,0" >
<ContentPresenter x:Name="ContentSite"
VerticalAlignment="Center"
HorizontalAlignment="Center"
ContentSource="Header"
RecognizesAccessKey="True" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Foreground" Value="Cyan"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="TabItem">
<Setter Property="FontFamily" Value="{StaticResource ResourceFont}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabItem">
<Border Name="Border" BorderThickness="3,3,3,0" BorderBrush="Navy" Padding="5,1,5,2" CornerRadius="5,5,0,0" Margin="2,0" >
<ContentPresenter x:Name="ContentSite"
VerticalAlignment="Center"
HorizontalAlignment="Center"
ContentSource="Header"
RecognizesAccessKey="True" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Foreground" Value="Cyan"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
1 replies
CC#
Created by Baymax on 12/31/2023 in #help
[WPF] How to edit multiple items in ListBox at once
I'm trying to edit multiple items using SelectionMode="Extended" to give the items a specific value, I'm using SelectedItems property to get the items, just don't know how to save it back to the ListBox after edit.
9 replies