Posted 16 years ago
by bhanu
![Avatar](https://secure.gravatar.com/avatar/27bec33c7f76f2f3fc66149e5f63be6e.jpg?s=64&d=identicon&r=g)
Hi,
Iam New to WPFControls.Iam using WizardControl in my application.In my application First iam using BlankPage for that Iam using UserControl and written code Like:
<UserControl
x:Class="SampleAuditioner.UserControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="namespace:SampleAuditioner;assembly=mscorlib"
xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared"
xmlns:wizard="http://schemas.actiprosoftware.com/winfx/xaml/wizard"
>
<UserControl.Resources >
</UserControl.Resources>
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<Border Width="600" Height="450" BorderBrush="Gray" BorderThickness="1">
<wizard:Wizard x:Name="wizard" BackButtonText="Back" BackButtonEnabled ="False" NextButtonText="Next" NextButtonVisible="True" NextButtonEnabled="True" CancelButtonText="Cancel" CancelButtonVisible="True" CancelButtonEnabled="True" FinishButtonVisible="False" HelpButtonVisible="False" PageSequenceType="Stack" ForceCursor="False">
<wizard:WizardPage x:Name="customPage" PageType="Blank" NextPage="finishPage"
Caption="Welcome To">
<Grid ClipToBounds="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="532.169*" />
<ColumnDefinition Width="65.831*" />
</Grid.ColumnDefinitions>
<Rectangle Grid.ColumnSpan="2">
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#B3CDED" />
<GradientStop Offset="0.75" Color="#6A8EBD" />
<GradientStop Offset="1" Color="#79A1D9" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Ellipse Fill="#6A8EBD" Opacity="0.15" Grid.ColumnSpan="2">
<Ellipse.RenderTransform>
<TransformGroup>
<TranslateTransform X="-100" Y="-10" />
<ScaleTransform ScaleX="3" ScaleY="3" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Ellipse Fill="#6A8EBD" Opacity="0.15" Grid.ColumnSpan="2">
<Ellipse.RenderTransform>
<TransformGroup>
<TranslateTransform X="-100" Y="-10" />
<ScaleTransform ScaleX="3" ScaleY="2.2" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<shared:DropShadowChrome Margin="70,40,4.169,40" Color="#71000000">
<Border x:Name="customPageBorder" BorderBrush="Black" BorderThickness="1">
<StackPanel Background="White">
<TextBlock Margin="14" FontFamily="Cambria" FontSize="14pt" FontWeight="Bold" Foreground="#365F91" TextWrapping="Wrap" Text="{Binding ElementName=customPage, Path=Caption}" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
<TextBlock Margin="14,0,14,0" FontFamily="Calibri" FontSize="12pt" TextWrapping="Wrap">
The Auditioner
<LineBreak />
<LineBreak />
The Auditioner is the first interactive software progrm spcifically
Designed to help film.
<LineBreak />
<LineBreak />
</TextBlock >
<TextBlock Margin="10,0,10,0" FontFamily="Calibri" FontSize="12" TextWrapping="Wrap" Width="332.189" HorizontalAlignment="Center" TextDecorations="None">
The Actor's ToolBox Software series.
<LineBreak />
</TextBlock>
</StackPanel>
</Border>
</shared:DropShadowChrome>
</Grid>
</wizard:WizardPage>
</wizard:Wizard>
</Border>
</ScrollViewer>
</UserControl>
Iam using same Namespace .and i wrote code in MainWindow like :
<Window x:Class="SampleAuditioner.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared"
xmlns:wizard="http://schemas.actiprosoftware.com/winfx/xaml/wizard"
xmlns:SampleAuditioner="clr-namespace:SampleAuditioner"
Title="SampleAuditionerWindow" Height="800" Width="800" SizeToContent="Height" ResizeMode="CanResize" >
<SampleAuditioner:UserControl1 ></SampleAuditioner:UserControl1>
</Window>
But it is not woking.how to bind UserControl to Mainwindow.Please give Reply to me
[Modified at 08/26/2008 06:41 AM]
Iam New to WPFControls.Iam using WizardControl in my application.In my application First iam using BlankPage for that Iam using UserControl and written code Like:
<UserControl
x:Class="SampleAuditioner.UserControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="namespace:SampleAuditioner;assembly=mscorlib"
xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared"
xmlns:wizard="http://schemas.actiprosoftware.com/winfx/xaml/wizard"
>
<UserControl.Resources >
</UserControl.Resources>
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<Border Width="600" Height="450" BorderBrush="Gray" BorderThickness="1">
<wizard:Wizard x:Name="wizard" BackButtonText="Back" BackButtonEnabled ="False" NextButtonText="Next" NextButtonVisible="True" NextButtonEnabled="True" CancelButtonText="Cancel" CancelButtonVisible="True" CancelButtonEnabled="True" FinishButtonVisible="False" HelpButtonVisible="False" PageSequenceType="Stack" ForceCursor="False">
<wizard:WizardPage x:Name="customPage" PageType="Blank" NextPage="finishPage"
Caption="Welcome To">
<Grid ClipToBounds="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="532.169*" />
<ColumnDefinition Width="65.831*" />
</Grid.ColumnDefinitions>
<Rectangle Grid.ColumnSpan="2">
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#B3CDED" />
<GradientStop Offset="0.75" Color="#6A8EBD" />
<GradientStop Offset="1" Color="#79A1D9" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Ellipse Fill="#6A8EBD" Opacity="0.15" Grid.ColumnSpan="2">
<Ellipse.RenderTransform>
<TransformGroup>
<TranslateTransform X="-100" Y="-10" />
<ScaleTransform ScaleX="3" ScaleY="3" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Ellipse Fill="#6A8EBD" Opacity="0.15" Grid.ColumnSpan="2">
<Ellipse.RenderTransform>
<TransformGroup>
<TranslateTransform X="-100" Y="-10" />
<ScaleTransform ScaleX="3" ScaleY="2.2" />
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<shared:DropShadowChrome Margin="70,40,4.169,40" Color="#71000000">
<Border x:Name="customPageBorder" BorderBrush="Black" BorderThickness="1">
<StackPanel Background="White">
<TextBlock Margin="14" FontFamily="Cambria" FontSize="14pt" FontWeight="Bold" Foreground="#365F91" TextWrapping="Wrap" Text="{Binding ElementName=customPage, Path=Caption}" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
<TextBlock Margin="14,0,14,0" FontFamily="Calibri" FontSize="12pt" TextWrapping="Wrap">
The Auditioner
<LineBreak />
<LineBreak />
The Auditioner is the first interactive software progrm spcifically
Designed to help film.
<LineBreak />
<LineBreak />
</TextBlock >
<TextBlock Margin="10,0,10,0" FontFamily="Calibri" FontSize="12" TextWrapping="Wrap" Width="332.189" HorizontalAlignment="Center" TextDecorations="None">
The Actor's ToolBox Software series.
<LineBreak />
</TextBlock>
</StackPanel>
</Border>
</shared:DropShadowChrome>
</Grid>
</wizard:WizardPage>
</wizard:Wizard>
</Border>
</ScrollViewer>
</UserControl>
Iam using same Namespace .and i wrote code in MainWindow like :
<Window x:Class="SampleAuditioner.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared"
xmlns:wizard="http://schemas.actiprosoftware.com/winfx/xaml/wizard"
xmlns:SampleAuditioner="clr-namespace:SampleAuditioner"
Title="SampleAuditionerWindow" Height="800" Width="800" SizeToContent="Height" ResizeMode="CanResize" >
<SampleAuditioner:UserControl1 ></SampleAuditioner:UserControl1>
</Window>
But it is not woking.how to bind UserControl to Mainwindow.Please give Reply to me
[Modified at 08/26/2008 06:41 AM]