Click here to Skip to main content
15,916,417 members
Home / Discussions / WPF
   

WPF

 
QuestionResourceDictionary swapped at run-time only applies to MainWindow Pin
Imagiv5-Aug-16 6:51
Imagiv5-Aug-16 6:51 
AnswerRe: ResourceDictionary swapped at run-time only applies to MainWindow Pin
Richard Deeming5-Aug-16 7:02
mveRichard Deeming5-Aug-16 7:02 
GeneralRe: ResourceDictionary swapped at run-time only applies to MainWindow Pin
Imagiv5-Aug-16 7:18
Imagiv5-Aug-16 7:18 
QuestionKeepTextBoxDisplaySynchronizedWithTextProperty Pin
Kevin Marois28-Jul-16 7:18
professionalKevin Marois28-Jul-16 7:18 
AnswerRe: KeepTextBoxDisplaySynchronizedWithTextProperty Pin
Matt T Heffron28-Jul-16 7:33
professionalMatt T Heffron28-Jul-16 7:33 
GeneralRe: KeepTextBoxDisplaySynchronizedWithTextProperty Pin
Kevin Marois28-Jul-16 7:39
professionalKevin Marois28-Jul-16 7:39 
QuestionCreating a line break to keep visible tabitems from wrapping when other tabitems become visible. Pin
Stephen Holdorf28-Jul-16 3:16
Stephen Holdorf28-Jul-16 3:16 
AnswerRe: Creating a line break to keep visible tabitems from wrapping when other tabitems become visible. Pin
Stephen Holdorf28-Jul-16 14:41
Stephen Holdorf28-Jul-16 14:41 
QuestionDP not Working Pin
Kevin Marois27-Jul-16 8:01
professionalKevin Marois27-Jul-16 8:01 
AnswerRe: DP not Working Pin
Gerry Schmitz27-Jul-16 15:44
mveGerry Schmitz27-Jul-16 15:44 
GeneralRe: DP not Working Pin
Kevin Marois27-Jul-16 16:38
professionalKevin Marois27-Jul-16 16:38 
AnswerRe: DP not Working Pin
PureNsanity28-Jul-16 12:50
professionalPureNsanity28-Jul-16 12:50 
GeneralRe: DP not Working Pin
Kevin Marois28-Jul-16 13:29
professionalKevin Marois28-Jul-16 13:29 
GeneralRe: DP not Working Pin
PureNsanity28-Jul-16 13:51
professionalPureNsanity28-Jul-16 13:51 
GeneralRe: DP not Working Pin
Kevin Marois28-Jul-16 14:14
professionalKevin Marois28-Jul-16 14:14 
SuggestionRe: DP not Working Pin
Richard Deeming29-Jul-16 2:11
mveRichard Deeming29-Jul-16 2:11 
GeneralRe: DP not Working Pin
Richard Deeming29-Jul-16 2:12
mveRichard Deeming29-Jul-16 2:12 
GeneralRe: DP not Working Pin
PureNsanity29-Jul-16 3:47
professionalPureNsanity29-Jul-16 3:47 
AnswerRe: DP not Working Pin
Meshack Musundi2-Aug-16 22:33
professionalMeshack Musundi2-Aug-16 22:33 
QuestionScrolling data table area on a XAML page Pin
Stephen Holdorf26-Jul-16 13:41
Stephen Holdorf26-Jul-16 13:41 
I have been trying for several days to come up with a solution for the my application page. My page contains an upper section with a menu, page header, and two columns for a human head silhouette image and empty white section. That section works fine. What I have been trying to add to my page are two DataGrids side by side so it will create a single table of a total of four columns. Now on each DataGrid the first column is a Description and the second column is the Value it displayed for the Description. What I am trying to do is have a table on the page that appears to make up a single table with 17 rows of Description/values. I don't want either DataGrid to have a scroll bar and each not to be able to scroll. In some of the DataGrid cell a want a background color of blue. Now on the page this table is in a DockPanel with a height of 368 units. What I want is the DockPanel to have a scroll bar so both DataGrids can be scrolled up and down as a single table. First, I have found the it is almost impossible to change the background of a DataGrid Column's Cell. Next my DockPanel scroll bar does not appear and each of the DataGrids are still able to scroll. Below is both the XAML and the code behind. I am only showing 8 rows for testing. If anyone can help that would be great.

Page XAML

HTML
  <ScrollViewer Height="368" Width="900" VerticalScrollBarVisibility="Auto">
     <DockPanel Background="White" Height="368" VerticalAlignment="Top">
         <DataGrid Name="main1" ScrollViewer.CanContentScroll="False" AutoGenerateColumns="False" BorderBrush="White" DockPanel.Dock="Left" HorizontalAlignment="Left" Width="495" >
             <DataGrid.Columns>
                 <DataGridTextColumn FontSize="14" FontWeight="Bold" Header="Test Description" Binding="{Binding Description }" />
                 <DataGridTextColumn FontSize="14" FontWeight="Bold"  Binding="{Binding Value}" />
             </DataGrid.Columns>
        </DataGrid>
         <DataGrid Name="main1" ScrollViewer.CanContentScroll="False" AutoGenerateColumns="False" BorderBrush="White" DockPanel.Dock="Left" HorizontalAlignment="Left" Width="495" >
             <DataGrid.Columns>
                 <DataGridTextColumn FontSize="14" FontWeight="Bold" Header="Test Description" Binding="{Binding Description }" />
                 <DataGridTextColumn FontSize="14" FontWeight="Bold"  Binding="{Binding Value}" />
             </DataGrid.Columns>
        </DataGrid>
    </DockPanel>
</ScrollViewer> 



Code behind:

C#
List<InformationValues> InformationValuess = new List<InformationValues>();
List<InformationValues> InformationValuess2 = new List<InformationValues>();
List<InformationValues> InformationValuess3 = new List<InformationValues>();
List<InformationValues> InformationValuess4 = new List<InformationValues>();

InformationValuess.Add(new InformationValues() { Description = "Test Description1", Value = "Test Value1" });
InformationValuess.Add(new InformationValues() { Description = "Test Description2", Value = "Test Value2" });
InformationValuess.Add(new InformationValues() { Description = "Test Description3", Value = "Test Value3" });
InformationValuess.Add(new InformationValues() { Description = "Test Description4", Value = "Test Value4" });

InformationValuess2.Add(new InformationValues() { Description = "Test Description1", Value = "Test Value1" });
InformationValuess2.Add(new InformationValues() { Description = "Test Description2", Value = "Test Value2" });
InformationValuess2.Add(new InformationValues() { Description = "Test Description3", Value = "Test Value3" });
InformationValuess2.Add(new InformationValues() { Description = "Test Description4", Value = "Test Value4" });

InformationValuess3.Add(new InformationValues() { Description = "Test Description1", Value = "Test Value1" });
InformationValuess3.Add(new InformationValues() { Description = "Test Description2", Value = "Test Value2" });
InformationValuess3.Add(new InformationValues() { Description = "Test Description3", Value = "Test Value3" });
InformationValuess3.Add(new InformationValues() { Description = "Test Description4", Value = "Test Value4" });

InformationValuess4.Add(new InformationValues() { Description = "Test Description1", Value = "Test Value1" });
InformationValuess4.Add(new InformationValues() { Description = "Test Description2", Value = "Test Value2" });
InformationValuess4.Add(new InformationValues() { Description = "Test Description3", Value = "Test Value3" });
InformationValuess4.Add(new InformationValues() { Description = "Test Description4", Value = "Test Value4" });



main1.ItemsSource = InformationValuess;
main2.ItemsSource = InformationValuess2;

AnswerRe: Scrolling data table area on a XAML page Pin
Mycroft Holmes26-Jul-16 14:32
professionalMycroft Holmes26-Jul-16 14:32 
GeneralRe: Scrolling data table area on a XAML page Pin
Stephen Holdorf27-Jul-16 0:31
Stephen Holdorf27-Jul-16 0:31 
GeneralRe: Scrolling data table area on a XAML page Pin
Mycroft Holmes27-Jul-16 12:44
professionalMycroft Holmes27-Jul-16 12:44 
QuestionWhere to call OnPropertyChanged Pin
Bernhard Hiller25-Jul-16 21:47
Bernhard Hiller25-Jul-16 21:47 
AnswerRe: Where to call OnPropertyChanged Pin
Gerry Schmitz26-Jul-16 3:47
mveGerry Schmitz26-Jul-16 3:47 

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.