当前位置: 首页 > wzjs >正文

因网站开发需要网站建设要那些东西

因网站开发需要,网站建设要那些东西,flash学习网站,网页制作公司是做什么的WPF常用技巧汇总-CSDN博客 主要用于记录工作中发现的一些问题和常见的解决方法。 目录 WPF常用技巧汇总-CSDN博客 1. DataGrid Tooltip - Multiple 2. DataGrid Tooltip - Cell值和ToolTip值一样 3. DataGrid Tooltip - Cell值和ToolTip值不一样 4. DataGrid - Ctrl A /…

WPF常用技巧汇总-CSDN博客

主要用于记录工作中发现的一些问题和常见的解决方法。

目录

WPF常用技巧汇总-CSDN博客

1. DataGrid Tooltip - Multiple

2. DataGrid Tooltip - Cell值和ToolTip值一样

3. DataGrid Tooltip - Cell值和ToolTip值不一样

4. DataGrid - Ctrl +A /Ctrl + C复制的内容不是Cell的值

5. DataGrid - Edit -Combox

6. DataGrid - 解决DataGridTemplateColumn无法排序的问题


1. DataGrid Tooltip - Multiple

 <DataGridTemplateColumn MinWidth="120" x:Name="colExclude"><DataGridTemplateColumn.HeaderTemplate><DataTemplate><Grid><Grid.RowDefinitions><RowDefinition Height="*"/><RowDefinition Height="*"/></Grid.RowDefinitions><Grid.ColumnDefinitions><ColumnDefinition Width="*"></ColumnDefinition><ColumnDefinition Width="*"></ColumnDefinition><ColumnDefinition Width="*"></ColumnDefinition></Grid.ColumnDefinitions><Label Style="{StaticResource LabelHeaderWhiteColorStyle}" Grid.Row="0" Grid.ColumnSpan="2" HorizontalAlignment="Center" Content="Exclude"/><Border Grid.Row="0" Grid.Column="2" Width="22" Margin="0,2" ToolTipService.ShowDuration="50000"><Border.Background><ImageBrush ImageSource="..\..\..\Images\question_mark.png"/></Border.Background><Border.ToolTip><ToolTip><StackPanel><Label Content="Tool Tip:" HorizontalAlignment="Center"/><Label Content="Notice = Exclude Notice: Lender selected will not be available in the Notice Preview"/><Label Content="JobTicket = Exclude Job Ticket: Lender selected will not be available in the Job Ticket Preview"/><Label Content="Recon = Exclude Distribution: Lender selected will decrease the Total Cash Actual expected in Reconciliation"/></StackPanel></ToolTip></Border.ToolTip></Border><Label Style="{StaticResource LabelHeaderWhiteColorStyle}" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Left" Content="Notice"/><Label Style="{StaticResource LabelHeaderWhiteColorStyle}" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left" Content="JobTicket"/><Label Style="{StaticResource LabelHeaderWhiteColorStyle}" Grid.Row="1" Grid.Column="2" HorizontalAlignment="Left" Content="Recon"/></Grid></DataTemplate></DataGridTemplateColumn.HeaderTemplate><DataGridTemplateColumn.CellTemplate><DataTemplate><Grid IsEnabled="{Binding DataContext.IsCashDistributeEnable, RelativeSource={RelativeSource AncestorType={x:Type bs:AgencyWindowBase}},Mode=OneWay}"><Grid.ColumnDefinitions><ColumnDefinition Width="*"/><ColumnDefinition Width="*"/><ColumnDefinition Width="*"/></Grid.ColumnDefinitions><CheckBox Style="{StaticResource CheckBoxInCellStyle}" HorizontalAlignment="Left" Grid.Column="0" IsChecked="{Binding DataContext.ExcludeFromNotice, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}},Mode=TwoWay}" IsThreeState="False" IsEnabled="{Binding DataContext.IsExcludeNoticeEnabled, RelativeSource={RelativeSource AncestorType={x:Type bs:AgencyWindowBase}},Mode=OneWay}"/><CheckBox Style="{StaticResource CheckBoxInCellStyle}" Grid.Column="1" IsChecked="{Binding DataContext.ExcludeFromJobTicket, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}},Mode=TwoWay}" IsThreeState="False" IsEnabled="{Binding DataContext.IsExcludeJTAndReconEnable, RelativeSource={RelativeSource AncestorType={x:Type bs:AgencyWindowBase}},Mode=OneWay}" HorizontalAlignment="Center"/><CheckBox Style="{StaticResource CheckBoxInCellStyle}" HorizontalAlignment="Right" Grid.Column="2" IsChecked="{Binding DataContext.ExcludeFromRecon, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}},Mode=TwoWay}" IsThreeState="False" IsEnabled="{Binding DataContext.IsExcludeJTAndReconEnable, RelativeSource={RelativeSource AncestorType={x:Type bs:AgencyWindowBase}},Mode=OneWay}"/></Grid></DataTemplate></DataGridTemplateColumn.CellTemplate></DataGridTemplateColumn>

2. DataGrid Tooltip - Cell值和ToolTip值一样

<DataGridTextColumn Header="Borrower Name" Binding="{Binding BorrowerName}" IsReadOnly="True" MinWidth="150" Width="150" MaxWidth="1000"><DataGridTextColumn.CellStyle><Style TargetType="DataGridCell"><Setter Property="ToolTip" Value="{Binding BorrowerName}"></Setter></Style></DataGridTextColumn.CellStyle>
</DataGridTextColumn>

3. DataGrid Tooltip - Cell值和ToolTip值不一样

<DataGridTextColumn Header="Borrower Name" Binding="{Binding BorrowerName}" IsReadOnly="True" MinWidth="150" Width="150" MaxWidth="1000"><DataGridTextColumn.CellStyle><Style TargetType="DataGridCell"><Setter Property="ToolTip" Value="{Binding BorrowerNameToolTip}"></Setter></Style></DataGridTextColumn.CellStyle>
</DataGridTextColumn>

4. DataGrid - Ctrl +A /Ctrl + C复制的内容不是Cell的值

默认copy的内容是Cell的value, 即Binding的field的value。

但是有时候我们想copy的是其他的field值,怎么办? 

比如我们这个列显示的是一些内容的缩写,但是拷贝的时候需要拷贝全整的内容。

此时可以通过指定ClipboardContentBinding去解决此类问题。

 <DataGridTextColumn Header="Sending To" Binding="{Binding singleRecipient}" IsReadOnly="True" MinWidth="200" Width="240" ClipboardContentBinding="{Binding Recipients}"><DataGridTextColumn.CellStyle><Style TargetType="DataGridCell"><Setter Property="ToolTip" Value="{Binding Recipients}"></Setter></Style></DataGridTextColumn.CellStyle></DataGridTextColumn>

5. DataGrid - Edit -Combox

 <DataGridTemplateColumn Width="180" IsReadOnly="False"><DataGridTemplateColumn.HeaderTemplate><DataTemplate><StackPanel Orientation="Horizontal"><TextBlock FontWeight="SemiBold" Text="Account Name "/><Image Source="..\..\..\Images\question_mark.png" Height="15" Width="15" HorizontalAlignment="Right" Grid.Column="1" ToolTipService.ToolTip="Bla bla bla..." /></StackPanel></DataTemplate></DataGridTemplateColumn.HeaderTemplate><DataGridTemplateColumn.CellTemplate><DataTemplate><StackPanel Orientation="Horizontal" HorizontalAlignment="Left"><Label ToolTip="{Binding  SelectedAccount.Name}" Content="{Binding SelectedAccount.Name}" Visibility="{Binding Path=IsAccountEdit, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=false}"></Label></StackPanel></DataTemplate></DataGridTemplateColumn.CellTemplate><DataGridTemplateColumn.CellEditingTemplate><DataTemplate><ComboBox Visibility="{Binding Path=IsAccountEditShow, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=false}" Width="170" SelectedValue="{Binding SelectedAccount, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}, Mode=FindAncestor}}" x:Name="cbxSelectedAcount" SelectionChanged="cbxSelectedAcount_SelectionChanged"ItemsSource="{Binding Path=Accounts, UpdateSourceTrigger=PropertyChanged}"IsEnabled="{Binding DataContext.NoticeTemplate.Payment.IsTypeBorrowingOIDAndHasAgentAccountId, Converter={StaticResource InverseBooleanConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}, Mode=FindAncestor}}"><ComboBox.ItemTemplate><DataTemplate><TextBlock Text="{Binding Account.Name}" Foreground="Black"/></DataTemplate></ComboBox.ItemTemplate></ComboBox></DataTemplate></DataGridTemplateColumn.CellEditingTemplate></DataGridTemplateColumn>
      private void cbxSelectedAcount_SelectionChanged(object sender, SelectionChangedEventArgs e){if (e.AddedItems.Count > 0){var selectedAccount = e.AddedItems[0] as AccountDto;}}

6. DataGrid - 解决DataGridTemplateColumn无法排序的问题

DataGrid设置了CanUserSortColumns="True"后,DataGridTemplateColumn点击Header后无法支持排序。此时可通过指定CanUserSort="True" 和SortMemberPath="SelectedAccount.Name"解决。

      <DataGridTemplateColumn Width="180" IsReadOnly="False" CanUserSort="True" SortMemberPath="SelectedAccount.Name" ><DataGridTemplateColumn.HeaderTemplate><DataTemplate><StackPanel Orientation="Horizontal"><TextBlock FontWeight="SemiBold" Text="Account Name "/><Image Source="..\..\..\Images\question_mark.png" Height="15" Width="15" HorizontalAlignment="Right" Grid.Column="1" ToolTipService.ToolTip="Wire Instructions of the selected Account will be used on the Notice.&#x0a;&#x0a;Accounts are setup at the Facility Level under the Lender's Admin Details.&#x0a;&#x0a;If an Account is unavailable:&#x0a;1) Check if its Currency matches the Payment Currency&#x0a;2) Check it's selected for ALL applicable Payment Types" /></StackPanel></DataTemplate></DataGridTemplateColumn.HeaderTemplate><DataGridTemplateColumn.CellTemplate><DataTemplate><StackPanel Orientation="Horizontal" HorizontalAlignment="Left"><Label ToolTip="{Binding  SelectedAccount.Name}" Content="{Binding SelectedAccount.Name}" Visibility="{Binding Path=IsAccountEdit, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=false}"></Label></StackPanel></DataTemplate></DataGridTemplateColumn.CellTemplate><DataGridTemplateColumn.CellEditingTemplate><DataTemplate><ComboBox Visibility="{Binding Path=IsAccountEditShow, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=false}"  Width="170" SelectedValue="{Binding SelectedAccount, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}, Mode=FindAncestor}}" x:Name="cbxSelectedAcountForLender" SelectionChanged="cbxSelectedAcountForLender_SelectionChanged"ItemsSource="{Binding Path=Accounts, UpdateSourceTrigger=PropertyChanged}"><ComboBox.ItemTemplate><DataTemplate><TextBlock Text="{Binding Account.Name}" Width="150" Foreground="Black"/></DataTemplate></ComboBox.ItemTemplate></ComboBox></DataTemplate></DataGridTemplateColumn.CellEditingTemplate></DataGridTemplateColumn>


文章转载自:

http://twhFRdaO.gmgyt.cn
http://JhiUT8Xh.gmgyt.cn
http://Nb0WVZH6.gmgyt.cn
http://1TtDgciv.gmgyt.cn
http://tfCE04tu.gmgyt.cn
http://BQtfZD8v.gmgyt.cn
http://XubwT8E7.gmgyt.cn
http://unMBF5mp.gmgyt.cn
http://6WIcucOC.gmgyt.cn
http://hulkrn8c.gmgyt.cn
http://cH7o3GcR.gmgyt.cn
http://fTNNv5yT.gmgyt.cn
http://ws7SFF7a.gmgyt.cn
http://fwhcFwag.gmgyt.cn
http://38gRN7Xa.gmgyt.cn
http://OXdbnxw9.gmgyt.cn
http://Q6pzIKsi.gmgyt.cn
http://Ij8YAmlF.gmgyt.cn
http://JGKxkqjD.gmgyt.cn
http://o5TPwPyo.gmgyt.cn
http://gfJuz8cb.gmgyt.cn
http://YrHCmWy3.gmgyt.cn
http://Tk9KUXbq.gmgyt.cn
http://K5MeyhzJ.gmgyt.cn
http://CBw8GOXB.gmgyt.cn
http://aM1HuX4w.gmgyt.cn
http://cNzd5GJ6.gmgyt.cn
http://013TjRRo.gmgyt.cn
http://QhT4G4pT.gmgyt.cn
http://xrPDO1cL.gmgyt.cn
http://www.dtcms.com/wzjs/769343.html

相关文章:

  • 微网站 html5沈阳德泰诺网站建设公司怎么样
  • 一个网站有多少g无锡哪个网站好
  • 高校档案室网站建设前后端分离企业网站源码
  • 自己如何网站建设wordpress 免邮箱
  • 网上商城网站制作莱州网页设计公司
  • 柳州关键词优化网站快速搭建wordpress
  • 网站抓取诊断ip出错广州网络设计
  • 大连城乡建设网站商贸公司网站模板
  • 做电子商务平台网站需要多少钱常用网站推广方法电商
  • 广告创意图片seo网站优化怎么做
  • 医药公司网站建设备案html5网站源代码
  • 网站开发eq编辑器响应式门户网站模板
  • 西宁网站建设加盟代理招生推广渠道有哪些呢
  • 佛山网站建设公司名单做装修的有那些网站
  • 南京规划建设展览馆网站企业网站开发教程
  • 顺德网站制作案例咨询fullpage做的网站
  • 体育门户网站源码网络营销的方法包括哪些
  • 南昌做网站和微信小程序的公司温州营销网站制作费用
  • 辽阳网站建设学校网站建设柚子网络科技
  • 温州网站制作报价永州网站开发
  • 珠海做网站的网站的服务有哪些
  • 移动门户网站建设特点爱站网长尾关键词挖掘工具的作用
  • 市网站制作打开网址选择浏览器
  • 租赁空间网站建设国外网站赚钱
  • 山东禹城市建设局网站邢台网站设计怎么做
  • 杭州建设网站职称人才工作专题企业建设网站公司有哪些
  • 网站开发项目报告建筑行业网站模板
  • 建设网站建设投标网1249中官网词做广告的软件app
  • 广州网站建设排名网页制作网站制作步骤
  • 让百度收录网站wordpress腾讯云搭建网站