| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <UserControl x:Class="Muchinfo.MTPClient.Account.Views.MessageView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:converters="clr-namespace:Muchinfo.MTPClient.Infrastructure.Converters;assembly=Muchinfo.MTPClient.Infrastructure"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:dataGrid="clr-namespace:Muchinfo.WPF.Controls.DataGrid;assembly=Muchinfo.WPF.Controls"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:resource="clr-namespace:Muchinfo.MTPClient.Resources;assembly=Muchinfo.MTPClient.Resources"
- xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
- Background="{DynamicResource MuchinfoBrush5}"
- DataContext="{Binding Message,
- Source={StaticResource Locator}}"
- mc:Ignorable="d">
- <UserControl.Resources>
- <converters:MessageReadStatusConverter x:Key="messageReadStatusConverter" />
- <!-- <converters:StringSubstringConverter x:Key="stringSubstringConverter" /> -->
- </UserControl.Resources>
- <xctk:BusyIndicator BusyContent="{x:Static resource:Muchinfo_Resource.Content_SearchBusy}" IsBusy="{Binding IsBusy, Mode=TwoWay}">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <StackPanel Grid.Row="0"
- Margin="0,4"
- Background="{DynamicResource MuchinfoBrush2}"
- Orientation="Horizontal">
- <TextBlock Margin="10,0"
- VerticalAlignment="Center"
- Foreground="{DynamicResource MuchinfoBrush13}"
- Text="{x:Static resource:Muchinfo_Resource.Content_ReleascDate}" />
- <DatePicker Width="120"
- Height="23"
- CalendarStyle="{DynamicResource CalendarStyle}"
- KeyUp="Title_OnKeyUp"
- SelectedDate="{Binding StartDateTime,
- Mode=TwoWay}" />
- <TextBlock Margin="10,0"
- VerticalAlignment="Center"
- Foreground="{DynamicResource MuchinfoBrush13}"
- Text="{x:Static resource:Muchinfo_Resource.Content_To}" />
- <DatePicker Width="120"
- Height="23"
- CalendarStyle="{DynamicResource CalendarStyle}"
- KeyUp="Title_OnKeyUp"
- SelectedDate="{Binding EndDateTime,
- Mode=TwoWay}" />
- <TextBlock Margin="10,0"
- VerticalAlignment="Center"
- Foreground="{DynamicResource MuchinfoBrush13}"
- Text="{x:Static resource:Muchinfo_Resource.Content_Theme}" />
- <TextBox Width="120"
- Height="23"
- KeyUp="Title_OnKeyUp"
- Text="{Binding SelectWhere}" />
- <Button Height="26"
- Margin="10,0"
- Command="{Binding QuetyCommand}"
- Content="{x:Static resource:Muchinfo_Resource.Button_Search}"
- Style="{DynamicResource CommonButtonStyle}" />
- </StackPanel>
- <dataGrid:MuchinfoDataGrid x:Name="dg_Message"
- Grid.Row="1"
- ItemsSource="{Binding MessageSource}"
- SelectedItem="{Binding SelectedItemMessage}"
- SelectionMode="Extended"
- Style="{DynamicResource AccountMuchinfoDataGridStyle}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="MouseDoubleClick">
- <i:InvokeCommandAction Command="{Binding ShowCommand}" />
- <!-- CommandParameter="{Binding SelectedItems, ElementName=dg_Message}" -->
- </i:EventTrigger>
- </i:Interaction.Triggers>
- <DataGrid.Columns>
- <DataGridTemplateColumn Width="150"
- MinWidth="150"
- Header="{x:Static resource:Muchinfo_Resource.Content_State}"
- SortMemberPath="ReadStatus">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Image Width="16"
- Height="16"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Source="{Binding ReadStatus,
- Converter={StaticResource messageReadStatusConverter},
- Mode=TwoWay}" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <!-- ,Converter={StaticResource stringSubstringConverter} -->
- <DataGridTextColumn Width="*"
- Binding="{Binding Title}"
- ElementStyle="{StaticResource DataGridTextColumnStyle}"
- Header="{x:Static resource:Muchinfo_Resource.Content_Theme}" />
- <!--
- <DataGridTextColumn Width="*"
- Binding="{Binding Content,Converter={StaticResource stringSubstringConverter}}"
- ElementStyle="{StaticResource DataGridTextColumnStyle}"
- Header="内容" />
- -->
- <DataGridTextColumn Width="200"
- MinWidth="200"
- Binding="{Binding PublishDate,
- StringFormat=\{0:yyyy-MM-dd\}}"
- ElementStyle="{StaticResource DataGridTextColumnStyle}"
- Header="{x:Static resource:Muchinfo_Resource.Content_ReleascDates}" />
- <!--
- <DataGridTextColumn Width="150"
- Binding="{Binding ValidDate,
- StringFormat=\{0:yyyy-MM-dd HH:mm:ss\}}"
- ElementStyle="{StaticResource DataGridTextColumnStyle}"
- Header="失效时间" />
- -->
- </DataGrid.Columns>
- </dataGrid:MuchinfoDataGrid>
- </Grid>
- </xctk:BusyIndicator>
- </UserControl>
|