前台Xaml      

  <ComboBox x:Name="cmboxStretch"  Width="120" Height="35" HorizontalAlignment="Left" Margin="5 0 0 0"
                             SelectedItem="{Binding Path=Stretch}"
                             VerticalContentAlignment="Center">
            </ComboBox>
  <Viewbox Stretch="{Binding SelectedValue,ElementName=cmboxStretch}" Grid.Row="1" x:Name="viewBox">
  </Viewbox>

后台代码     

 cmboxStretch.ItemsSource= System.Enum.GetValues(typeof(Stretch));

选择Combox就能看到ViewBox属性值Stretch在变化了。

相关文章:

  • 2021-08-30
  • 2022-12-23
  • 2022-12-23
  • 2021-06-21
  • 2021-06-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-26
  • 2021-06-21
  • 2021-05-25
  • 2022-12-23
  • 2022-03-05
  • 2022-02-06
相关资源
相似解决方案