zoukankan      html  css  js  c++  java
  • wpf 扩展标记应用 数据类型转

    总是忘记语法,复制下来记录一下。

      <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(SkewTransform.AngleX)" Storyboard.TargetName="grid">

    <TextBox Grid.Column="1" Text="{Binding Path=(ListBox.SelectedValue).(DoMain:GroupModel.RowID),ElementName=mylistbox}"
                   IsReadOnly="True" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center"/>
          <ListBox  x:Name="mylistbox" Grid.Row="2" Grid.ColumnSpan="2" SelectionMode="Single" IsSynchronizedWithCurrentItem="True"
                      ItemsSource="{Binding}">
              <ListBox.Template>
                  <ControlTemplate>
                      <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" >
                         <WrapPanel Orientation="Horizontal" IsItemsHost="True"/>
                      </ScrollViewer>
                  </ControlTemplate>
              </ListBox.Template>
              <ListBox.ItemContainerStyle>
                  <Style TargetType="ListBoxItem">
                      <EventSetter Event="ListBoxItem.PreviewMouseDoubleClick"
                                   Handler="ListBoxItemDoubleClick" />
                  </Style>
              </ListBox.ItemContainerStyle>
              <ListBox.ItemTemplate>
                  <DataTemplate DataType="{x:Type DoMain:GroupModel}">
                      <Grid >
                          <Grid.RowDefinitions>
                              <RowDefinition Height="60"/>
                              <RowDefinition/>
                          </Grid.RowDefinitions>
                          <Image Source="{Binding Ico,Mode=OneWay,Converter={StaticResource imageConverter}}"/>
                          <Label Grid.Row="1" Content="{Binding GroupName}" />
                      </Grid>
                  </DataTemplate>
              </ListBox.ItemTemplate>
          </ListBox>

  • 相关阅读:
    记录此刻的感受(2018年8月26日19:44)
    提高工作效率
    VS C++项目报错warning C4199: ……use /Zc:twoPhase-
    dll加载遇到的问题
    记录xerces使用(VS2017 C++)
    vs编译应用程序不依赖运行vs环境
    [Locked] Binary Tree Vertical Order Traversal
    [Locked] Group Shifted Strings
    [Locked] Graph Valid Tree
    [Locked] Flatten 2D Vector
  • 原文地址:https://www.cnblogs.com/aoldman/p/2844494.html
Copyright © 2011-2022 走看看