|
Hi everybody.
this is my code :
System.Timers.Timer aTimer = new
System.Timers.Timer(1000);
public Window1()
{
InitializeComponent();
aTimer.Elapsed += new
System.Timers.ElapsedEventHandler
(aTimer_Elapsed);
aTimer.Enabled = true;
}
void aTimer_Elapsed(object sender,
System.Timers.ElapsedEventArgs e)
{
secondHand.Angle = DateTime.Now.Second * 6;
}
and this is my XAML code :
<Rectangle Margin="150,0,149,150"
Name="rectangleSecond" Stroke="White"
Height="120" VerticalAlignment="Bottom"
><Rectangle.RenderTransform>
<RotateTransform x:Name="secondHand"
CenterX="0" CenterY="120"
Angle="0" />
</Rectangle.RenderTransform>
</Rectangle>
But there is an exception in it !
The calling thread cannot access this object because a different
thread owns it.
How can I solve it ?
Thanks in advance.
|
|
|
|
|
|
Thank you Insincere Dave.
I found it here[^]
|
|
|
|
|
Hi,
I want to show the multiple attribute values of a node from XML file to treeview...
So please help me to fetch the multiple attribute values of the following XML file....
<Sections>
<Web>
<Site site="Public Site" category="CORE" >
<Search>
<Parameter name="State" value="" type="SelectList"/>
<Parameter name="zipcode" value="" type="TextField"/>
</Search>
</Site>
</Web>
</Sections>
from this file i want to bind this XMl file to tree view and i want show all node,attributes and its values like name,value,type etc......
Can anybody help ASAP.....
|
|
|
|
|
You could always code up something like this:
<Window x:Class="WpfTreeview.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Window.Resources>
<DataTemplate x:Key="NodeTemplate">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding XPath=@name}" />
<TextBlock Text=" : " />
<TextBlock Text="{Binding XPath=@type}" />
</StackPanel>
</DataTemplate>
</Window.Resources>
<Grid>
<TreeView Name="treeView1" ItemTemplate="{StaticResource NodeTemplate}" />
</Grid>
</Window>
|
|
|
|
|
Can any one help
I have tried, Create one Custom Control using Custom Control(WPF) in visual studio 2005 and .net 3.0,
MyCustomButton
ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:MyCustomButton"
but I got the default error and can not open the Design Page.
Error: Assembly '' was not found. The 'clr-namespace' URI refers to an assembly that is not referenced by the project.
|
|
|
|
|
Either MyCustomButton is in an external reference which you need to add into your project and reference using the assembly syntax at the end or, if the button is in your project, it hasn't successfully built - and so, won't appear.
|
|
|
|
|
As the title above, is it possible to create an animated masking in WPF just like in adobe flash? Let's say I have a circle on the top layer as the mask and I have rectangle on second layer, I want to to make the circle grow from small to large and moving. Can anyone help me? Thanks in advance.
|
|
|
|
|
|
thanks dave, i found the link that you gave me very useful
|
|
|
|
|
Hi
I´m trying to make an ellipse move along a path and there are some things I don´t get. What I don´t get is the positioning of the ellipse path. It moves along the path but not on the path. Actully it moves like an inch below. Why? They have the same pathgeo. Can anyone help me out?
I just have an ellipse and a path in my wpf app and the code looks like this.
private void button1_Click(object sender, RoutedEventArgs e)
{
MatrixAnimationUsingPath anima = new MatrixAnimationUsingPath();
MatrixTransform xform = new MatrixTransform();
PathGeometry pathGeo = path1.Data.GetFlattenedPathGeometry();
e1.RenderTransform = xform;
anima.PathGeometry = pathGeo;
anima.BeginTime = TimeSpan.FromSeconds(0);
xform.BeginAnimation(MatrixTransform.MatrixProperty, anima);
}
Rednaw
|
|
|
|
|
I've just bought an upgrade to Blend 2, which I notice still doesn't appear to be able to target silverlight 2.
I see that the 2.5 preview does, but I can't seem to find any info on what the upgrade path (any costs and timescale) will be. Has anyone seen any details of what this will be?
|
|
|
|
|
The Expression team has said that Blend will continue to rev as Silverlight revs. I'm not sure whether there will be a full studio update when Silverlight ships, but I would expect a more finalized release or service pack for Blend at that time.
You can view upgrade information here:
http://www.microsoft.com/expression/products/Upgrade.aspx[^]
Service packs and minor releases are of course free. When Blend went from 1.0 to 2.0 the upgrade cost was $99. You can also buy a subscription for continuous updates.
Other ways to get Expression:
If you have an MSDN Pro license you have Expression Blend already.
If you have an MSDN Pro Premium license you have Expression Studio already.
If you are a college student you have access to Expression Studio through DreamSpark:
https://downloads.channel8.msdn.com[^]
DreamSpark is currently only available in the United States, the United Kingdom, Canada, China, Germany, France, Finland, Spain, Sweden, Switzerland and Belgium.
|
|
|
|
|
Thanks Jared,
Could you just clarify, are you saying that silverlight 2.x will correspond to Blend 2.x, and therefore Silverlight 2 support will *likely* be added to Blend 2 as a (free) service pack -
Or - When Silverlight 2 is finally released, a new release of Blend 3 will fully support it, which is likely to be available at an upgrade cost?
Obviously it's all guesswork to a certain extent until it's announced, but intelligent guesses are usually better than my guesses
Cheers,
Steve
|
|
|
|
|
I just forwarded the question on to the Blend team for a more official answer. They said they don't have any annoucments to make about future versions or service packs at this time. However, they also went on to say they are committed to enabling existing Blend 2 customers to create Silverlight 2 content when it is released at no charge.
So, yes, there should be some sort of free update or add-on for existing Blend 2 users.
|
|
|
|
|
Many thanks for your help Jared
|
|
|
|
|
Hello
How can i access to an Element of the Startup-Form from a other (WPF-)class??
My start is:
Public Sub New()
MyBase.New()
Me.InitializeComponent()
End Sub
Many thanks to all!
Peter
|
|
|
|
|
You can always use the StartupUri on the Application to find this. Here's an example, in C#:
MyControl control =((Window1)Application.Current.StartupUri).MyControl
|
|
|
|
|
Hi,
i was reading this http://www.codeproject.com/KB/WCF/WCFWPFChat.aspx[^]
article, and working with the application and its source code, as well as this one
http://www.ms.phy.hr/wcfchat/[^]
which it is somewhat based on.
I got my client/server to communicate with each other, but only if i run them on the same machine. I just don´t know how to configure the client and server when they are running on different machines in a network or over the internet. Every single example i found so far was about localhost. So I was hoping you could tell me how to set the endpoints(and the bindings) for Network and Internet on Client and server. An Example would be very helpful. Have a lot of thanks
|
|
|
|
|
Hi All, i'm trying to replicate the Windows Media Player style buttons in WPF, however i cant quite get it right, specifically the glow on the bottom. I've searched google and MSDN however i cant find a guide or existing control anywhere.
I can replicate them with a airbrush and colour dodge in photoshop, with a overlay layer for the top gradient. The glow effect in WPF doesnt quite get the right look though. I'm also having a bit of trouble figuring out the orders (the highlight part) without moving a path around when an item is selected. See this image:
http://www.intelligentflight.net/mark/WMP-MenuBar.jpg
taken from WMP and blown up 200%.
The corners on the top are easy enough using a border and just adding a corner radius to the top left/right, the highlight i can do with a rectangle or path and about 60% opacity, however the blue glow at the bottom has me rather confused. Any ideas would be much appreciated.
--
Real programmers don't comment their code. It was hard to write, it should be hard to understand.
|
|
|
|
|
Hi,
some of you might have already seen this:
http://www.youtube.com/watch?v=CufEjqqZ7WU
Does anybody know if and where there's some code around?
Kind regards,
Stevie
Greetings,
Stephan Eberle
hawke@deltacity.org
|
|
|
|
|
That's really neat--but no, I don't sorry.
“Time and space can be a bitch.”
–Gushie, Quantum Leap
{o,o}.oO( Looking for a great RSS reader? Try FeedBeast! )
|)””’) Built with home-grown CodeProject components!
-”-”-
|
|
|
|
|
Just to let you know - I'm most of the way through the auto commenting power toy. It's working pretty neatly right now - although I still haven't figured out the whole commenting attributes bit yet. Boy am I having fun.
The next bit is to work on the auto-uncommenting.
|
|
|
|
|
Awesome! Can't wait to see what you've come up with. It'll sure be nice to comment XAML with some authority!
Pete O'Hanlon wrote: The next bit is to work on the auto-uncommenting.
That would be nice, too.
“Time and space can be a bitch.”
–Gushie, Quantum Leap
{o,o}.oO( Looking for a great RSS reader? Try FeedBeast! )
|)””’) Built with home-grown CodeProject components!
-”-”-
|
|
|
|
|
I'm wishing that I'd done it sooner - it's already proving to be a time saver.
|
|
|
|