|
|
hi Michael you Know what is the solution for this error like
1 Error:The name 'InitializeComponent' does not exist in the current context in silverlight
Raaj
|
|
|
|
|
Hello,
I am new to WPF and I want to learn it as fast as I can :P I can't wait to give these new 3D effects to the applications I want to create. I found this cool 3d flip feature in this site
http://www.interact-sw.co.uk/iangblog/2007/05/17/wpf-flippable-3D-list[^]
Its purely made in XAML, but i know we can use Visual Studio 2008 and VB.NET to create effects like these... i tried to look for any kind of a tutorial on the net but i didn't get any which could teach me flipping controls in WPF windows in this manner.
If anyone could help me out I would be grateful
thank you
|
|
|
|
|
Why don't you just download the source for that page and work through it?
|
|
|
|
|
yes i have downloaded the xaml source code of that page... and am also trying to understand it... its pure XAML and i have no experience at all about it... but we can implement that using programming code in vb.net 2008 wpf if i am not wrong? so i was wondering if there is any proper tutorial which can guide me in what i want to achieve
|
|
|
|
|
No one is going to give you a complete translation of this project (I am having problems even downloading it). If you are just starting with XAML/WPF then I would suggest that you try something that is a bit more simpler, and perhaps buy a book on the subject. To answer one of your questions, all XAML can be converted to a C# or VB alternative (give or take amounts of code to accomplish the same thing), however XAML was meant to streamline the process. Also, if you are a student at a university or high school, you can get the Expression Studio for free from the DreamSpark program in my signature. Expression Blend will definitely help you with starting to write XAML.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Thank you.
Yes I am a student. But I already have Microsoft Expression Studio 2, I got it yesterday only from a friend of mine. Its just awesome. Using blend I created effects which I could never possibly dream of making using VB.Net alone. That too without knowing anything about XAML. I think I can use blend to get that effect displayed on that site.
I tried out some effects on my own for the first time :P . I imported a picture in the blend window and I made it 3D image from the option given in the tool's menu. After that the viewport3d was added and I could animate the picture in 3D motions. onMouseDown event it would zoom out, rotate on the Y axis and then again rotate back and zoom back in. Here is the application file of the first demo i made using blend
http://rapidshare.com/files/133404008/UntitledProject5.rar.html[^]
But I can't figure out how to include the viewport 3d in system controls like group box, rectangles etc. I googled for it too, but no luck.
If you could help me out a bit here, I can try creating that effect
|
|
|
|
|
I am not familiar with the viewport3d control, but I did notice it in a few of my WPF books (so look into getting a good book). You may also want to search the CodeProject, because I have seen some articles about it here.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
yes, I think I should get hold of a good book first thank you
|
|
|
|
|
Some book suggestions:
Windows Presentation Foundation Unleashed: Adam Nathan
Pro WPF: Windows Presentation Foundation in .NET 3.0: MacDonald
Pro WPF in C# 2008: MacDonald
I own these three WPF books and they are excellent resources (I also own many more on VS2008, but these are specific to WPF).
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Do you also provide a student's version of Zam 3D?
|
|
|
|
|
You would have to look into that yourself. You might even be able to google a student version of Zam 3D (I have never heard of it).
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Do you also provide a student's version of Zam 3D on your site??
|
|
|
|
|
hey can anyone tell me where can I get a CTP version of ZAM 3D. It's not available on their original site anymore
|
|
|
|
|
Like in .NET FW 2.0, there is Anchor property to set the controls Auto arrange. It will be much helpful if anyone could share info about similar property in WPF
|
|
|
|
|
For objects that are placed inside a grid a combination of HorizontalAlignment, VerticalAlignment and Margin can be used to control the position in a similar way to "Anhor".
Anchor right & bottom <=> HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="<not used="">,<not used="">,<distance from="" right="" edge="">,<distance from="" bottom="" edge="">"
Anchor left & right <=> HorizontalAlignment="Stretch".
As I said the controls must be placed inside a grid;
Mihai,
|
|
|
|
|
|
Don't think in terms of anchors ... WPF is a different beast.
As well as using Layout Grids you need to think about putting stack panels and so forth inside grids in order to get the layout of things working properly.
Simply using grids and then margins and so on will yield a UI that doesn't always scale well. Grids are good for deviding up UI but not the best way to actually position things ...
|
|
|
|
|
Ok,
I've defined a simple class called NonDataNode that has two members, Name (string) and ContainedItems (object) which will hold whatever type of object is contained by that node in the tree (couldn't be more specific because it could be just about anything). I also created another class called NonDataNodeList, which inherits from List<NonDataNode>. There are no changes in implementation, I just wanted a name that was easier to work with in XAML. ImageOutputType is a business object in my application. lib and local are namespaces defined with xmlns elements at the top of the XAML. The Window.Resources section is before the tree control.
So, the XAML for my treeview looks like this:
<TreeView Grid.Column="0" Grid.Row="2" HorizontalAlignment="Stretch" Background="Transparent" Foreground="{StaticResource TreeViewItemText}"
BorderBrush="DarkRed" BorderThickness="1" x:Name="trvNavigate" ItemTemplate="{StaticResource NonDataNodeTemplate}" >
</TreeView>
In my Window.Resources section, I've defined the following:
<HierarchicalDataTemplate DataType="local:NonDataNode" ItemsSource="{Binding Path=ContainedItems}" x:Key="NonDataNodeTemplate">
<TextBlock Text="{Binding Name}" Style="{StaticResource TreeViewNodeText}"/>
</HierarchicalDataTemplate>
<HierarchicalDataTemplate DataType="lib:ImageOutputType">
<TextBlock Text="{Binding Name}" Style="{StaticResource TreeViewNodeText}"/>
</HierarchicalDataTemplate>
You can see that the key for the heirarchical data template is NonDataNodeTemplate and that the treeview uses that as the item template. However, when I try to run this thing, I get the following error:
Cannot find resource named '{NonDataNodeTemplate}'. Resource names are case sensitive. Error at object 'trvNavigate' in markup file 'WGAdminPanel;component/mainwindow.xaml' Line 76 Position 82.
Now, I'm sure it's something simple I'm missing, but I've been stuck on this for about 4 hours. Can someone help me? I've tried google, but so far I haven't found any examples that I can make work.
Thanks,
Will
|
|
|
|
|
what happens if you try this:
DataType="{x:Type local:NonDataNode}" instead of DataType="local:NonDataNode" ?
Mihai,
|
|
|
|
|
That fixed it. Thank you.
|
|
|
|
|
Hi Guys,
I have created two xaml files , 1. Page1.xaml and 2. Page2.xaml
Page1.xaml has a Hyperlink with click event associated with a method as below:
<Grid>
<TextBlock>This is a <Hyperlink Name="myLink" Click="hyperlink_Clicked">hyperlink</Hyperlink> to page 2</TextBlock>
</Grid>
In page1.xaml.cs, i have created the method hyperlink_Clicked as below:
private void hyperlink_Clicked(object sender,System.EventArgs erg)
{
System.Uri myUri = new Uri("Page2.xaml",System.UriKind.Relative );
myLink.NavigateUri = myUri;
}
However, when i click on hyperlink for the first time, it does not navigate to page2, but if i click second time it goes to page2. Am i missing anything? late Binding or early binding?
Any help , appreciated.
Thanks
happy coding!
|
|
|
|
|
Without having tryed to reproduce your issue I suspect that the link would only work if it is in a focused control and that it is not the case when you first click.
Setting the focus reliably can only be done in the Loaded event, as it is well undocumented! , I suggest you write something as follow:
MyControl()
{
Loaded += (sender, e) => { Focus(); };
}
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
I have two sahpes created using Path which has Data Property. One Path is smaller and the other is Larger. I want to animate smaller Path and make it look like larger path. Please suggest me how to do this.
Path 1 :
path strokethickness="2.000000" stroke="#000000" fill="#000000" data="F1 M 148.692383,566.845703 L 198.179199,566.845703 L 197.963867,545.753906 L 197.757324,525.583984 L 138.201660,525.583984 C 138.201660,525.583984 139.660156,534.376953 141.660156,541.126953 C 143.660156,547.876953 148.692383,566.845703 148.692383,566.845703 Z" width="87.077" stretch="Fill"
Path 2 :
path strokethickness="2.000000" stroke="#000000" fill="#000000" data="F1 M 200.701172,444.335938 C 200.701172,444.335938 201.902344,454.123047 201.902344,467.187500 C 201.902344,477.767578 201.246582,481.021484 199.109375,489.334961 L 129.755859,489.334961 C 124.140625,485.524414 120.946777,474.328125 120.035156,463.418945 C 119.187988,453.281250 124.750488,444.418945 124.750488,444.418945 L 200.701172,444.335938 Z" stretch="Fill"
Thanks In advance.
|
|
|
|
|
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="DemoAnim.Window1"
x:Name="Window"
Title="Window1"
Width="640" Height="480">
<Window.Resources>
<Storyboard x:Key="GrowEllipse">
<doubleanimationusingkeyframes begintime="00:00:00" storyboard.targetname="ellipse" storyboard.targetproperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" mode="hold" /> <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
<SplineDoubleKeyFrame KeyTime="00:00:01" Value="1.643"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
<SplineDoubleKeyFrame KeyTime="00:00:01" Value="1.643"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</Window.Resources>
<Window.Triggers>
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<BeginStoryboard Storyboard="{StaticResource GrowEllipse}"/>
</EventTrigger>
</Window.Triggers>
<Grid x:Name="LayoutRoot">
<Ellipse Fill="#FFFF0000" Stroke="#FF000000" Margin="176,127,0,214" StrokeThickness="5" Width="112" HorizontalAlignment="Left" x:Name="ellipse" RenderTransformOrigin="0.5,0.5">
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1"/>
<SkewTransform AngleX="0" AngleY="0"/>
<RotateTransform Angle="0"/>
<TranslateTransform X="0" Y="0"/>
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Ellipse Fill="#FFFF0000" Stroke="#FF000000" StrokeThickness="5" Margin="0,91,75,178" Width="184" HorizontalAlignment="Right"/>
</Grid>
</Window>
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|