![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | How to Compose a Page From Grids Defined Outide the Page? Consider the following Scenario: I have a xaml project which contains 3 grids defined in separate XAML files, e.g., Grid1.xaml ----------------------- <Grid x:Class="Grid1"> //content </Grid> Grid2.xaml ----------------------- <Grid x:Class="Grid2"> //content </Grid> Grid3.xaml ----------------------- <Grid x:Class="Grid3"> //content </Grid> Now, How does one construct a page that displays these grids in, say, a Stack Panel? Thanks |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: How to Compose a Page From Grids Defined Outide the Page? In article <1163173383.530241.170150@h54g2000cwb.googlegroups.com>, CMoore@gmail.com says... > Consider the following Scenario: > > I have a xaml project which contains 3 grids defined in separate XAML > files, e.g., > > Grid1.xaml > ----------------------- > <Grid x:Class="Grid1"> > //content > </Grid> > > Grid2.xaml > ----------------------- > <Grid x:Class="Grid2"> > //content > </Grid> > > Grid3.xaml > ----------------------- > <Grid x:Class="Grid3"> > //content > </Grid> > > Now, How does one construct a page that displays these grids in, say, a > Stack Panel? > > Thanks > > Given 3 XAML files in the same directory as the exe.. <!-- xaml1.xaml --> <Button xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > Buton1</Button> <!-- xaml2.xaml --> <Button xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > Buton1</Button> <!-- xaml3.xaml --> <Button xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > Buton1</Button> this XAML... <Window x:Class="buildGUIviaXamlReader.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="buildGUIviaXamlReader" Height="300" Width="300" > <Grid Name="Grid1" Loaded="Grid1_Loaded"> <StackPanel Name="stackPanel1" /> </Grid> </Window> Married with this code behind... should do the trick using System; using System.Windows; using System.Windows.Markup; //XamlReader using System.IO; using System.Xml; namespace buildGUIviaXamlReader { public partial class Window1 : System.Windows.Window { public Window1() { InitializeComponent(); this.Grid1.Loaded += new RoutedEventHandler(Grid1 _Loaded); } void Grid1_Loaded(object sender, RoutedEventArgs e) { stackPanel1.Children.Clear(); LoadSomeXaml("xaml1.xaml"); LoadSomeXaml("xaml2.xaml"); LoadSomeXaml("xaml3.xaml"); } protected void LoadSomeXaml(string Xaml) { try { XmlTextReader xmlreader = new XmlTextReader (Xaml); UIElement el = (UIElement)XamlReader.Load (xmlreader); this.stackPanel1.Children.Add(el); } catch (Exception exc) { MessageBox.Show(exc.Message, Title); } } } } |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: How to Compose a Page From Grids Defined Outide the Page? In article <1163173383.530241.170150@h54g2000cwb.googlegroups.com>, CMoore@gmail.com says... > Consider the following Scenario: > > I have a xaml project which contains 3 grids defined in separate XAML > files, e.g., > > Grid1.xaml > ----------------------- > <Grid x:Class="Grid1"> > //content > </Grid> > > Grid2.xaml > ----------------------- > <Grid x:Class="Grid2"> > //content > </Grid> > > Grid3.xaml > ----------------------- > <Grid x:Class="Grid3"> > //content > </Grid> > > Now, How does one construct a page that displays these grids in, say, a > Stack Panel? > > Thanks > > Given 3 XAML files in the same directory as the exe.. <!-- xaml1.xaml --> <Button xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > Buton1</Button> <!-- xaml2.xaml --> <Button xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > Buton1</Button> <!-- xaml3.xaml --> <Button xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > Buton1</Button> this XAML... <Window x:Class="buildGUIviaXamlReader.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="buildGUIviaXamlReader" Height="300" Width="300" > <Grid Name="Grid1" Loaded="Grid1_Loaded"> <StackPanel Name="stackPanel1" /> </Grid> </Window> Married with this code behind... should do the trick using System; using System.Windows; using System.Windows.Markup; //XamlReader using System.IO; using System.Xml; namespace buildGUIviaXamlReader { public partial class Window1 : System.Windows.Window { public Window1() { InitializeComponent(); this.Grid1.Loaded += new RoutedEventHandler(Grid1 _Loaded); } void Grid1_Loaded(object sender, RoutedEventArgs e) { stackPanel1.Children.Clear(); LoadSomeXaml("xaml1.xaml"); LoadSomeXaml("xaml2.xaml"); LoadSomeXaml("xaml3.xaml"); } protected void LoadSomeXaml(string Xaml) { try { XmlTextReader xmlreader = new XmlTextReader (Xaml); UIElement el = (UIElement)XamlReader.Load (xmlreader); this.stackPanel1.Children.Add(el); } catch (Exception exc) { MessageBox.Show(exc.Message, Title); } } } } |
My System Specs![]() |
| | #4 (permalink) |
| Guest | Re: How to Compose a Page From Grids Defined Outide the Page? Bog, Thanks for your response and the example. Is there no declarative way that this can be accomplished via XAML only? I would like to be able to build the page that is composed of the grids entirely in XAML. There must be a simple way to do this but after much searching I cannot find an example. Chris. Bob wrote: > In article <1163173383.530241.170150@h54g2000cwb.googlegroups.com>, > CMoore@gmail.com says... > > Consider the following Scenario: > > > > I have a xaml project which contains 3 grids defined in separate XAML > > files, e.g., > > > > Grid1.xaml > > ----------------------- > > <Grid x:Class="Grid1"> > > //content > > </Grid> > > > > Grid2.xaml > > ----------------------- > > <Grid x:Class="Grid2"> > > //content > > </Grid> > > > > Grid3.xaml > > ----------------------- > > <Grid x:Class="Grid3"> > > //content > > </Grid> > > > > Now, How does one construct a page that displays these grids in, say, a > > Stack Panel? > > > > Thanks > > > > > > Given 3 XAML files in the same directory as the exe.. > > <!-- xaml1.xaml --> > <Button > xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > > Buton1</Button> > > <!-- xaml2.xaml --> > <Button > xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > > Buton1</Button> > > <!-- xaml3.xaml --> > <Button > xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > > Buton1</Button> > > this XAML... > > <Window x:Class="buildGUIviaXamlReader.Window1" > xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > Title="buildGUIviaXamlReader" Height="300" Width="300" > > > <Grid Name="Grid1" Loaded="Grid1_Loaded"> > <StackPanel Name="stackPanel1" /> > </Grid> > </Window> > > Married with this code behind... should do the trick > > using System; > using System.Windows; > using System.Windows.Markup; //XamlReader > using System.IO; > using System.Xml; > > namespace buildGUIviaXamlReader > { > public partial class Window1 : System.Windows.Window > { > public Window1() > { > InitializeComponent(); > this.Grid1.Loaded += new RoutedEventHandler(Grid1 > _Loaded); > } > > void Grid1_Loaded(object sender, RoutedEventArgs e) > { > stackPanel1.Children.Clear(); > LoadSomeXaml("xaml1.xaml"); > LoadSomeXaml("xaml2.xaml"); > LoadSomeXaml("xaml3.xaml"); > } > > protected void LoadSomeXaml(string Xaml) > { > try > { > XmlTextReader xmlreader = new XmlTextReader > (Xaml); > UIElement el = (UIElement)XamlReader.Load > (xmlreader); > this.stackPanel1.Children.Add(el); > } > catch (Exception exc) > { > MessageBox.Show(exc.Message, Title); > } > } > } > } |
My System Specs![]() |
| | #5 (permalink) |
| Guest | Re: How to Compose a Page From Grids Defined Outide the Page? Bog, Thanks for your response and the example. Is there no declarative way that this can be accomplished via XAML only? I would like to be able to build the page that is composed of the grids entirely in XAML. There must be a simple way to do this but after much searching I cannot find an example. Chris. Bob wrote: > In article <1163173383.530241.170150@h54g2000cwb.googlegroups.com>, > CMoore@gmail.com says... > > Consider the following Scenario: > > > > I have a xaml project which contains 3 grids defined in separate XAML > > files, e.g., > > > > Grid1.xaml > > ----------------------- > > <Grid x:Class="Grid1"> > > //content > > </Grid> > > > > Grid2.xaml > > ----------------------- > > <Grid x:Class="Grid2"> > > //content > > </Grid> > > > > Grid3.xaml > > ----------------------- > > <Grid x:Class="Grid3"> > > //content > > </Grid> > > > > Now, How does one construct a page that displays these grids in, say, a > > Stack Panel? > > > > Thanks > > > > > > Given 3 XAML files in the same directory as the exe.. > > <!-- xaml1.xaml --> > <Button > xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > > Buton1</Button> > > <!-- xaml2.xaml --> > <Button > xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > > Buton1</Button> > > <!-- xaml3.xaml --> > <Button > xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > > Buton1</Button> > > this XAML... > > <Window x:Class="buildGUIviaXamlReader.Window1" > xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > Title="buildGUIviaXamlReader" Height="300" Width="300" > > > <Grid Name="Grid1" Loaded="Grid1_Loaded"> > <StackPanel Name="stackPanel1" /> > </Grid> > </Window> > > Married with this code behind... should do the trick > > using System; > using System.Windows; > using System.Windows.Markup; //XamlReader > using System.IO; > using System.Xml; > > namespace buildGUIviaXamlReader > { > public partial class Window1 : System.Windows.Window > { > public Window1() > { > InitializeComponent(); > this.Grid1.Loaded += new RoutedEventHandler(Grid1 > _Loaded); > } > > void Grid1_Loaded(object sender, RoutedEventArgs e) > { > stackPanel1.Children.Clear(); > LoadSomeXaml("xaml1.xaml"); > LoadSomeXaml("xaml2.xaml"); > LoadSomeXaml("xaml3.xaml"); > } > > protected void LoadSomeXaml(string Xaml) > { > try > { > XmlTextReader xmlreader = new XmlTextReader > (Xaml); > UIElement el = (UIElement)XamlReader.Load > (xmlreader); > this.stackPanel1.Children.Add(el); > } > catch (Exception exc) > { > MessageBox.Show(exc.Message, Title); > } > } > } > } |
My System Specs![]() |
| | #6 (permalink) |
| Guest | Re: How to Compose a Page From Grids Defined Outide the Page? Do I understand well what u want ? Because I don't really see where the trouble is. Why don't u make these grids application scope resources ? "Chris Moore" <CMoore@gmail.com> a écrit dans le message de news: 1163173383.530241.170150@h54g2000cwb.googlegroups.com... > Consider the following Scenario: > > I have a xaml project which contains 3 grids defined in separate XAML > files, e.g., > > Grid1.xaml > ----------------------- > <Grid x:Class="Grid1"> > //content > </Grid> > > Grid2.xaml > ----------------------- > <Grid x:Class="Grid2"> > //content > </Grid> > > Grid3.xaml > ----------------------- > <Grid x:Class="Grid3"> > //content > </Grid> > > Now, How does one construct a page that displays these grids in, say, a > Stack Panel? > > Thanks > |
My System Specs![]() |
| | #7 (permalink) |
| Guest | Re: How to Compose a Page From Grids Defined Outide the Page? Do I understand well what u want ? Because I don't really see where the trouble is. Why don't u make these grids application scope resources ? "Chris Moore" <CMoore@gmail.com> a écrit dans le message de news: 1163173383.530241.170150@h54g2000cwb.googlegroups.com... > Consider the following Scenario: > > I have a xaml project which contains 3 grids defined in separate XAML > files, e.g., > > Grid1.xaml > ----------------------- > <Grid x:Class="Grid1"> > //content > </Grid> > > Grid2.xaml > ----------------------- > <Grid x:Class="Grid2"> > //content > </Grid> > > Grid3.xaml > ----------------------- > <Grid x:Class="Grid3"> > //content > </Grid> > > Now, How does one construct a page that displays these grids in, say, a > Stack Panel? > > Thanks > |
My System Specs![]() |
| | #8 (permalink) |
| Guest | Re: How to Compose a Page From Grids Defined Outide the Page? Read up on namespace declarations. You should be able to do the following: <Window xmlns:local="clr-namespace:YourNamespace"> <StackPanel> <local:Grid1 /> <local:Grid2 /> <local:Grid3 /> </StackPanel> </Window> - Doug "Chris Moore" <CMoore@gmail.com> wrote in message news:1163223265.763237.287150@m7g2000cwm.googlegroups.com... > Bog, > > Thanks for your response and the example. > > Is there no declarative way that this can be accomplished via XAML > only? I would like to be able to build the page that is composed of the > grids entirely in XAML. > > > There must be a simple way to do this but after much searching I cannot > find an example. > > Chris. > > Bob wrote: >> In article <1163173383.530241.170150@h54g2000cwb.googlegroups.com>, >> CMoore@gmail.com says... >> > Consider the following Scenario: >> > >> > I have a xaml project which contains 3 grids defined in separate XAML >> > files, e.g., >> > >> > Grid1.xaml >> > ----------------------- >> > <Grid x:Class="Grid1"> >> > //content >> > </Grid> >> > >> > Grid2.xaml >> > ----------------------- >> > <Grid x:Class="Grid2"> >> > //content >> > </Grid> >> > >> > Grid3.xaml >> > ----------------------- >> > <Grid x:Class="Grid3"> >> > //content >> > </Grid> >> > >> > Now, How does one construct a page that displays these grids in, say, a >> > Stack Panel? >> > >> > Thanks >> > >> > >> >> Given 3 XAML files in the same directory as the exe.. >> >> <!-- xaml1.xaml --> >> <Button >> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > >> Buton1</Button> >> >> <!-- xaml2.xaml --> >> <Button >> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > >> Buton1</Button> >> >> <!-- xaml3.xaml --> >> <Button >> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > >> Buton1</Button> >> >> this XAML... >> >> <Window x:Class="buildGUIviaXamlReader.Window1" >> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" >> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >> Title="buildGUIviaXamlReader" Height="300" Width="300" >> > >> <Grid Name="Grid1" Loaded="Grid1_Loaded"> >> <StackPanel Name="stackPanel1" /> >> </Grid> >> </Window> >> >> Married with this code behind... should do the trick >> >> using System; >> using System.Windows; >> using System.Windows.Markup; //XamlReader >> using System.IO; >> using System.Xml; >> >> namespace buildGUIviaXamlReader >> { >> public partial class Window1 : System.Windows.Window >> { >> public Window1() >> { >> InitializeComponent(); >> this.Grid1.Loaded += new RoutedEventHandler(Grid1 >> _Loaded); >> } >> >> void Grid1_Loaded(object sender, RoutedEventArgs e) >> { >> stackPanel1.Children.Clear(); >> LoadSomeXaml("xaml1.xaml"); >> LoadSomeXaml("xaml2.xaml"); >> LoadSomeXaml("xaml3.xaml"); >> } >> >> protected void LoadSomeXaml(string Xaml) >> { >> try >> { >> XmlTextReader xmlreader = new XmlTextReader >> (Xaml); >> UIElement el = (UIElement)XamlReader.Load >> (xmlreader); >> this.stackPanel1.Children.Add(el); >> } >> catch (Exception exc) >> { >> MessageBox.Show(exc.Message, Title); >> } >> } >> } >> } > |
My System Specs![]() |
| | #9 (permalink) |
| Guest | Re: How to Compose a Page From Grids Defined Outide the Page? Read up on namespace declarations. You should be able to do the following: <Window xmlns:local="clr-namespace:YourNamespace"> <StackPanel> <local:Grid1 /> <local:Grid2 /> <local:Grid3 /> </StackPanel> </Window> - Doug "Chris Moore" <CMoore@gmail.com> wrote in message news:1163223265.763237.287150@m7g2000cwm.googlegroups.com... > Bog, > > Thanks for your response and the example. > > Is there no declarative way that this can be accomplished via XAML > only? I would like to be able to build the page that is composed of the > grids entirely in XAML. > > > There must be a simple way to do this but after much searching I cannot > find an example. > > Chris. > > Bob wrote: >> In article <1163173383.530241.170150@h54g2000cwb.googlegroups.com>, >> CMoore@gmail.com says... >> > Consider the following Scenario: >> > >> > I have a xaml project which contains 3 grids defined in separate XAML >> > files, e.g., >> > >> > Grid1.xaml >> > ----------------------- >> > <Grid x:Class="Grid1"> >> > //content >> > </Grid> >> > >> > Grid2.xaml >> > ----------------------- >> > <Grid x:Class="Grid2"> >> > //content >> > </Grid> >> > >> > Grid3.xaml >> > ----------------------- >> > <Grid x:Class="Grid3"> >> > //content >> > </Grid> >> > >> > Now, How does one construct a page that displays these grids in, say, a >> > Stack Panel? >> > >> > Thanks >> > >> > >> >> Given 3 XAML files in the same directory as the exe.. >> >> <!-- xaml1.xaml --> >> <Button >> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > >> Buton1</Button> >> >> <!-- xaml2.xaml --> >> <Button >> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > >> Buton1</Button> >> >> <!-- xaml3.xaml --> >> <Button >> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > >> Buton1</Button> >> >> this XAML... >> >> <Window x:Class="buildGUIviaXamlReader.Window1" >> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" >> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >> Title="buildGUIviaXamlReader" Height="300" Width="300" >> > >> <Grid Name="Grid1" Loaded="Grid1_Loaded"> >> <StackPanel Name="stackPanel1" /> >> </Grid> >> </Window> >> >> Married with this code behind... should do the trick >> >> using System; >> using System.Windows; >> using System.Windows.Markup; //XamlReader >> using System.IO; >> using System.Xml; >> >> namespace buildGUIviaXamlReader >> { >> public partial class Window1 : System.Windows.Window >> { >> public Window1() >> { >> InitializeComponent(); >> this.Grid1.Loaded += new RoutedEventHandler(Grid1 >> _Loaded); >> } >> >> void Grid1_Loaded(object sender, RoutedEventArgs e) >> { >> stackPanel1.Children.Clear(); >> LoadSomeXaml("xaml1.xaml"); >> LoadSomeXaml("xaml2.xaml"); >> LoadSomeXaml("xaml3.xaml"); >> } >> >> protected void LoadSomeXaml(string Xaml) >> { >> try >> { >> XmlTextReader xmlreader = new XmlTextReader >> (Xaml); >> UIElement el = (UIElement)XamlReader.Load >> (xmlreader); >> this.stackPanel1.Children.Add(el); >> } >> catch (Exception exc) >> { >> MessageBox.Show(exc.Message, Title); >> } >> } >> } >> } > |
My System Specs![]() |
| | #10 (permalink) |
| Guest | Re: How to Compose a Page From Grids Defined Outide the Page? Thanks; that worked like a charm and was exactly what I was looking for. I knew there must be a simple way to do it..... Douglas Stockwell wrote: > Read up on namespace declarations. You should be able to do the following: > > <Window xmlns:local="clr-namespace:YourNamespace"> > <StackPanel> > <local:Grid1 /> > <local:Grid2 /> > <local:Grid3 /> > </StackPanel> > </Window> > > - Doug > > "Chris Moore" <CMoore@gmail.com> wrote in message > news:1163223265.763237.287150@m7g2000cwm.googlegroups.com... > > Bog, > > > > Thanks for your response and the example. > > > > Is there no declarative way that this can be accomplished via XAML > > only? I would like to be able to build the page that is composed of the > > grids entirely in XAML. > > > > > > There must be a simple way to do this but after much searching I cannot > > find an example. > > > > Chris. > > > > Bob wrote: > >> In article <1163173383.530241.170150@h54g2000cwb.googlegroups.com>, > >> CMoore@gmail.com says... > >> > Consider the following Scenario: > >> > > >> > I have a xaml project which contains 3 grids defined in separate XAML > >> > files, e.g., > >> > > >> > Grid1.xaml > >> > ----------------------- > >> > <Grid x:Class="Grid1"> > >> > //content > >> > </Grid> > >> > > >> > Grid2.xaml > >> > ----------------------- > >> > <Grid x:Class="Grid2"> > >> > //content > >> > </Grid> > >> > > >> > Grid3.xaml > >> > ----------------------- > >> > <Grid x:Class="Grid3"> > >> > //content > >> > </Grid> > >> > > >> > Now, How does one construct a page that displays these grids in, say, a > >> > Stack Panel? > >> > > >> > Thanks > >> > > >> > > >> > >> Given 3 XAML files in the same directory as the exe.. > >> > >> <!-- xaml1.xaml --> > >> <Button > >> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > > >> Buton1</Button> > >> > >> <!-- xaml2.xaml --> > >> <Button > >> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > > >> Buton1</Button> > >> > >> <!-- xaml3.xaml --> > >> <Button > >> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > > >> Buton1</Button> > >> > >> this XAML... > >> > >> <Window x:Class="buildGUIviaXamlReader.Window1" > >> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > >> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > >> Title="buildGUIviaXamlReader" Height="300" Width="300" > >> > > >> <Grid Name="Grid1" Loaded="Grid1_Loaded"> > >> <StackPanel Name="stackPanel1" /> > >> </Grid> > >> </Window> > >> > >> Married with this code behind... should do the trick > >> > >> using System; > >> using System.Windows; > >> using System.Windows.Markup; //XamlReader > >> using System.IO; > >> using System.Xml; > >> > >> namespace buildGUIviaXamlReader > >> { > >> public partial class Window1 : System.Windows.Window > >> { > >> public Window1() > >> { > >> InitializeComponent(); > >> this.Grid1.Loaded += new RoutedEventHandler(Grid1 > >> _Loaded); > >> } > >> > >> void Grid1_Loaded(object sender, RoutedEventArgs e) > >> { > >> stackPanel1.Children.Clear(); > >> LoadSomeXaml("xaml1.xaml"); > >> LoadSomeXaml("xaml2.xaml"); > >> LoadSomeXaml("xaml3.xaml"); > >> } > >> > >> protected void LoadSomeXaml(string Xaml) > >> { > >> try > >> { > >> XmlTextReader xmlreader = new XmlTextReader > >> (Xaml); > >> UIElement el = (UIElement)XamlReader.Load > >> (xmlreader); > >> this.stackPanel1.Children.Add(el); > >> } > >> catch (Exception exc) > >> { > >> MessageBox.Show(exc.Message, Title); > >> } > >> } > >> } > >> } > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| page disappears when Mouse moved off page | CDNHart | General Discussion | 10 | 07-31-2008 05:02 PM |
| Blue Screen - Page fault in non page area | Gregstagg985 | Vista performance & maintenance | 0 | 07-22-2008 04:31 PM |
| web page | big rick | Vista General | 6 | 03-20-2008 07:52 AM |
| Error Message - Page error in non page area | Don | Vista hardware & devices | 1 | 08-18-2007 11:46 AM |
| IE7 Crashes when loading home page-any home page | Jim Marcum | Vista General | 5 | 04-14-2007 02:29 PM |