Click here to Skip to main content
15,912,977 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Philosophical question on MVVM lookups and practical one on entity fields.... Pin
Abhinav S13-Apr-10 18:31
Abhinav S13-Apr-10 18:31 
GeneralRe: Philosophical question on MVVM lookups and practical one on entity fields.... Pin
RichardGrimmer13-Apr-10 21:30
RichardGrimmer13-Apr-10 21:30 
QuestionSelecting an item as per value in combobox in wpf Pin
dashingsidds12-Apr-10 22:50
dashingsidds12-Apr-10 22:50 
AnswerRe: Selecting an item as per value in combobox in wpf Pin
Arun Jacob12-Apr-10 22:58
Arun Jacob12-Apr-10 22:58 
GeneralRe: Selecting an item as per value in combobox in wpf [modified] Pin
dashingsidds12-Apr-10 23:26
dashingsidds12-Apr-10 23:26 
AnswerRe: Selecting an item as per value in combobox in wpf Pin
Arun Jacob12-Apr-10 23:30
Arun Jacob12-Apr-10 23:30 
GeneralRe: Selecting an item as per value in combobox in wpf Pin
dashingsidds12-Apr-10 23:41
dashingsidds12-Apr-10 23:41 
GeneralRe: Selecting an item as per value in combobox in wpf Pin
Arun Jacob12-Apr-10 23:47
Arun Jacob12-Apr-10 23:47 
AnswerRe: Selecting an item as per value in combobox in wpf Pin
Sunil Scaria12-Apr-10 23:15
Sunil Scaria12-Apr-10 23:15 
GeneralRe: Selecting an item as per value in combobox in wpf Pin
dashingsidds12-Apr-10 23:28
dashingsidds12-Apr-10 23:28 
GeneralRe: Selecting an item as per value in combobox in wpf Pin
Sunil Scaria12-Apr-10 23:34
Sunil Scaria12-Apr-10 23:34 
GeneralRe: Selecting an item as per value in combobox in wpf Pin
dashingsidds12-Apr-10 23:44
dashingsidds12-Apr-10 23:44 
QuestionAccessing a WPF object inside a class Pin
Prasoon Chaudhary12-Apr-10 20:44
Prasoon Chaudhary12-Apr-10 20:44 
AnswerRe: Accessing a WPF object inside a class Pin
Arun Jacob12-Apr-10 23:34
Arun Jacob12-Apr-10 23:34 
GeneralRe: Accessing a WPF object inside a class Pin
Prasoon Chaudhary12-Apr-10 23:40
Prasoon Chaudhary12-Apr-10 23:40 
AnswerRe: Accessing a WPF object inside a class Pin
Arun Jacob12-Apr-10 23:46
Arun Jacob12-Apr-10 23:46 
GeneralRe: Accessing a WPF object inside a class Pin
Prasoon Chaudhary13-Apr-10 0:12
Prasoon Chaudhary13-Apr-10 0:12 
AnswerRe: Accessing a WPF object inside a class Pin
Nish Nishant13-Apr-10 15:37
sitebuilderNish Nishant13-Apr-10 15:37 
GeneralRe: Accessing a WPF object inside a class Pin
Prasoon Chaudhary13-Apr-10 20:40
Prasoon Chaudhary13-Apr-10 20:40 
GeneralRe: Accessing a WPF object inside a class Pin
Nish Nishant14-Apr-10 2:13
sitebuilderNish Nishant14-Apr-10 2:13 
QuestionProblems with WPF Datagrid in Stackpanel Pin
Member 454056412-Apr-10 3:48
Member 454056412-Apr-10 3:48 
I am having trouble with a Datagrid within a stackpanel. I put a stackpanel around the datagrid because I want the datagrid size to collapse to accordingly to the amount of rows I bring back. My problem lies when I bring back a lot of rows because it displays everything in the datagrid and the datagrids scrollbar never shows. I know I could put a maxheight on the datagrid but if I need to take into account the actual size of the window because of screen resolution and size. If I put a maxheight on the datagrid it would not look right when the screen is maximized, there would be a lot of extra white space. I want the datagrid to expand proportionately to the bottom of the screen. I am using the MVVM pattern.
<Grid x:Name="PatientSearchResultsGrid"  Grid.Row="2" Margin="0" >
               <Grid.ColumnDefinitions>
                   <ColumnDefinition Width="*"/>
               </Grid.ColumnDefinitions>
               <Grid.RowDefinitions>
                   <RowDefinition Height="*"/>
               </Grid.RowDefinitions>
                   <StackPanel Grid.Row="1" Margin="0,12,0,46" >
                       <Grid Margin="0,3,4,23"   Panel.ZIndex="596" x:Name="LayoutGrid"  Visibility="{Binding HideShowDatagrid,  Converter={StaticResource MyBooleanToVisibilityConverter}}" >
                           <Grid.ColumnDefinitions>
                               <ColumnDefinition Width="*"/>
                               <ColumnDefinition Width="Auto"/>
                           </Grid.ColumnDefinitions>
                           <Grid.RowDefinitions>
                               <RowDefinition Height="Auto"/>
                           </Grid.RowDefinitions>

                                   <dg:DataGrid
                                   Cursor="Hand"
                                   Grid.Row="1"
                                   AlternationCount="2"
                                   SelectedItem="{Binding SelectedPerson}"
                                   ItemsSource="{Binding SelectedPeople}"
                                   Style="{DynamicResource DataGridStyle}"
                                   AutoGenerateColumns="False"
                                   x:Name="PatientSearchResultsDG"
                                   Margin="2,-17.8,3,1.7" BorderThickness="1,0,1,1" BorderBrush="#FF202020"     >

                                       <dg:DataGrid.Resources>
                                           <Style TargetType="{x:Type dg:DataGridRowHeader}">
                                               <Setter Property="Background" Value="Transparent"/>
                                           </Style>
                                       </dg:DataGrid.Resources>

                                       <dg:DataGrid.Columns>
                                           <dg:DataGridTextColumn Binding="{Binding Name}" IsReadOnly="True" x:Name="PatientName"  Width="*"     Header="Name"    />
                                           <dg:DataGridTextColumn Binding="{Binding SidNumber}"  IsReadOnly="True" x:Name="SID"  Width="*"  Header="SID" />
                                           <dg:DataGridTextColumn Binding="{Binding InmateNumber}"  IsReadOnly="True" x:Name="InmateNum"  Width="*"  Header="Inmate #"  />
                                           <dg:DataGridTextColumn Binding="{Binding Sex}" IsReadOnly="True"   x:Name="Sex"  Width="*"  Header="Sex"  />
                                           <dg:DataGridTextColumn Binding="{Binding DateOfBirth, StringFormat=' \{0:MM/dd/yyyy\}'}"   IsReadOnly="True"  x:Name="DOB"  Width="*"  Header="Date of Birth" />
                                           <dg:DataGridTextColumn Binding="{Binding FacilityName}" IsReadOnly="True"   x:Name="Facility"  Width="*"  Header="Facility"  />
                                           <dg:DataGridTextColumn Binding="{Binding Housing}"  IsReadOnly="True"  x:Name="Housing"  Width="*"  Header="Housing"  />
                                           <dg:DataGridTextColumn Binding="{Binding Active}"  IsReadOnly="True"  x:Name="Active"  Width="*"  Header="Active"  />
                                           <dg:DataGridTextColumn Binding="{Binding Locked}" IsReadOnly="True"  x:Name="Locked"   Width="*"  Header="Locked"  />
                                       </dg:DataGrid.Columns>
                                   </dg:DataGrid>

                       </Grid>
       </StackPanel>
     </Grid>

AnswerRe: Problems with WPF Datagrid in Stackpanel Pin
Abhinav S12-Apr-10 6:43
Abhinav S12-Apr-10 6:43 
AnswerRe: Problems with WPF Datagrid in Stackpanel Pin
Scott Munro17-Apr-11 14:45
Scott Munro17-Apr-11 14:45 
QuestionHow to set Node Indent for TreeView in wpf? Pin
baiyuxiong11-Apr-10 19:55
baiyuxiong11-Apr-10 19:55 
AnswerRe: How to set Node Indent for TreeView in wpf? Pin
Parwej Ahamad12-Apr-10 6:24
professionalParwej Ahamad12-Apr-10 6:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.