PetitKinder
PetitKinder
CC#
Created by PetitKinder on 6/29/2023 in #help
❔ combobox with radioButtons
8 replies
CC#
Created by PetitKinder on 6/29/2023 in #help
❔ combobox with radioButtons
maybe a combobox is not the easiest solution. How would you replicate this type of popup in wpf ?
8 replies
CC#
Created by PetitKinder on 6/29/2023 in #help
❔ combobox with radioButtons
in fact they are using an extended toolkit to achieve this "checkbox combobox"
8 replies
CC#
Created by PetitKinder on 6/29/2023 in #help
❔ combobox with radioButtons
well is there a way to do that in XAML ?
8 replies
CC#
Created by PetitKinder on 6/13/2023 in #help
❔ WPF data binding
maybe it's because I'm redefining the Textbox' Style. How can I tell the textBox's Text property of TextboxTheme = textBox's Text property of ShotTheme ?
65 replies
CC#
Created by PetitKinder on 6/13/2023 in #help
❔ WPF data binding
65 replies
CC#
Created by PetitKinder on 6/13/2023 in #help
❔ WPF data binding
ok so I know where the problem is from. In the shotTheme above, I'm defining a couple of textBox. They all share the same style TextboxTheme. If I remove the style, the binding of Scene is working, the value is updated correctly. What I don't understand is why, with the theme, it's not working.
65 replies
CC#
Created by PetitKinder on 6/13/2023 in #help
❔ WPF data binding
So maybe the problem is somewhere else
65 replies
CC#
Created by PetitKinder on 6/13/2023 in #help
❔ WPF data binding
nope, not working
65 replies
CC#
Created by PetitKinder on 6/13/2023 in #help
❔ WPF data binding
I will try your version
65 replies
CC#
Created by PetitKinder on 6/13/2023 in #help
❔ WPF data binding
but it's still not working
65 replies
CC#
Created by PetitKinder on 6/13/2023 in #help
❔ WPF data binding
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:model="clr-namespace:ProductionSheets.MVVM.Model">

<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="TextboxTheme.xaml"/>
</ResourceDictionary.MergedDictionaries>

<Style TargetType="{x:Type ListViewItem}"
x:Key="ShotTheme">
<Style.Setters>
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate DataType="model:ShotModel">

<Border Background="Transparent"
BorderThickness="0,2,0,2"
BorderBrush="#cccccc"
Margin="20,0,20,0">

<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextboxTheme}"
Name="Scene"
Text="{Binding Scene}"/>

<TextBox Style="{StaticResource TextboxTheme}"
Name="Shot"
Text="{Binding Shot}"/>
<TextBox Style="{StaticResource TextboxTheme}"
Name="Environment"
Text="{Binding Environment}"/>
</StackPanel>

</Border>

</DataTemplate>
</Setter.Value>
</Setter>

</Style.Setters>
</Style>
</ResourceDictionary>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:model="clr-namespace:ProductionSheets.MVVM.Model">

<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="TextboxTheme.xaml"/>
</ResourceDictionary.MergedDictionaries>

<Style TargetType="{x:Type ListViewItem}"
x:Key="ShotTheme">
<Style.Setters>
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate DataType="model:ShotModel">

<Border Background="Transparent"
BorderThickness="0,2,0,2"
BorderBrush="#cccccc"
Margin="20,0,20,0">

<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextboxTheme}"
Name="Scene"
Text="{Binding Scene}"/>

<TextBox Style="{StaticResource TextboxTheme}"
Name="Shot"
Text="{Binding Shot}"/>
<TextBox Style="{StaticResource TextboxTheme}"
Name="Environment"
Text="{Binding Environment}"/>
</StackPanel>

</Border>

</DataTemplate>
</Setter.Value>
</Setter>

</Style.Setters>
</Style>
</ResourceDictionary>
65 replies
CC#
Created by PetitKinder on 6/13/2023 in #help
❔ WPF data binding
I've tried like that
65 replies
CC#
Created by PetitKinder on 6/13/2023 in #help
❔ WPF data binding
Any other ideas ? i'm stuck
65 replies
CC#
Created by PetitKinder on 6/13/2023 in #help
❔ WPF data binding
well no I can't do that
65 replies
CC#
Created by PetitKinder on 6/13/2023 in #help
❔ WPF data binding
I will try using a dataTrigger outside Style
65 replies
CC#
Created by PetitKinder on 6/13/2023 in #help
❔ WPF data binding
so I need a style, but if I'm right I can't use dataTemplate in a style
65 replies
CC#
Created by PetitKinder on 6/13/2023 in #help
❔ WPF data binding
because my listView has the property ItemContentStyle set to the style ShotTheme
65 replies
CC#
Created by PetitKinder on 6/13/2023 in #help
❔ WPF data binding
But can I do that within a style ?
65 replies
CC#
Created by PetitKinder on 6/13/2023 in #help
❔ WPF data binding
yeah it seems to be a problem around the template, but I'm not used to xaml enough to re-template everything, I think I will have to do some research
65 replies