在WPF 3.5SP1中,我使用DataBindings中的最后一个功能StringFormat:
<TextBlock Text="{Binding Path=Model.SelectedNoteBook.OriginalDate, StringFormat='f'}"
FontSize="20" TextTrimming="CharacterEllipsis" />
Run Code Online (Sandbox Code Playgroud)
我面临的问题是日期总是用英文格式化...虽然我的系统是法语的?我如何强制日期遵循系统日期?
我怎样才能类型的子控件ComboBox中MyContainer Grid的WPF?
<Grid x:Name="MyContainer">
<Label Content="Name" Name="label1" />
<Label Content="State" Name="label2" />
<ComboBox Height="23" HorizontalAlignment="Left" Name="comboBox1"/>
<ComboBox Height="23" HorizontalAlignment="Left" Name="comboBox3" />
<ComboBox Height="23" HorizontalAlignment="Left" Name="comboBox4" />
</Grid>
Run Code Online (Sandbox Code Playgroud)
这行给了我一个错误:
var myCombobox = this.MyContainer.Children.GetType(ComboBox);
Run Code Online (Sandbox Code Playgroud)