|
Hello everyone
I have following code as you can see in next post(I need to turn off HTML tags to paste XAML )
With looks like this picture[^]
So the question is why where I put mouse cursor over the button it changes to normal winform apperance. When I move it out it's working again
Thanks for the replay
|
|
|
|
|
Here is the code
<code>
<Button Name="fde" Height="150" Width="150" Foreground="DarkRed" FontSize="20">
<Button.BitmapEffect>
<OuterGlowBitmapEffect x:Name="GlowBitmapEffect" Noise="0" GlowSize="6" Opacity="0.9" />
</Button.BitmapEffect>
<Button.Content>Abscdef</Button.Content>
<Button.Background>
<DrawingBrush>
<DrawingBrush.Drawing>
<GeometryDrawing Brush="DarkBlue" >
<GeometryDrawing.Geometry>
<GeometryGroup FillRule="Nonzero" >
<EllipseGeometry RadiusX="20" RadiusY="45" Center="50,50" />
<EllipseGeometry RadiusX="45" RadiusY="20" Center="50,50" />
</GeometryGroup>
</GeometryDrawing.Geometry>
<GeometryDrawing.Pen>
<Pen Thickness="6">
<Pen.Brush>
<LinearGradientBrush>
<GradientStop Offset="0.0" Color="Black" />
<GradientStop Offset="1.0" Color="Gray" />
</LinearGradientBrush>
</Pen.Brush>
</Pen>
</GeometryDrawing.Pen>
</GeometryDrawing>
</DrawingBrush.Drawing>
</DrawingBrush>
</Button.Background>
<Button.Triggers>
<EventTrigger RoutedEvent="Button.MouseEnter">
<BeginStoryboard>
<Storyboard Storyboard.TargetName="GlowBitmapEffect" Storyboard.TargetProperty="Opacity">
<DoubleAnimation From="0.0" To="1.0" AutoReverse="True" Duration="0 :1.5" RepeatBehavior="Forever" ></DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Button.Triggers>
</Button>
</code>
|
|
|
|
|
Hi,
This behaviour is being caused by the default behaviour of the button ContentTemplate. You will need to define a new ContentTemplate for your button by using a ResourceDictionary and build the required elements as part of the new template. From the new template definition you will also be able to specify any mouse or keyboard related events that require animation.
See below for further information:
http://msdn2.microsoft.com/en-us/library/ms771597.aspx
Hope this helps...
Clean code is the key to happiness.
|
|
|
|
|
Thanks I'll look at this
|
|
|
|
|
How can i clear out arrows in tree view in expanded elements?
Because shows arrows and text, but i wanna show only text....
Help, plz...
ISQ 469907496
|
|
|
|
|
You will need to edit the control templates. This very easy in Blend because Blend returns back a copy of the current control template with one click of the mouse. There are also free videos on the Expression Blend site that walk you through editing a control template.
Here are two resources that will get you started.
http://www.codeproject.com/KB/WPF/CustomTreeViewLayout.aspx[^]
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2791439&SiteID=1[^]
FYI: The control template you need is nested inside the TreeViewItem and is actually a style for a ToggleButton .
Question: If you clear out the arrow, how will the user know that they can click a element and see more data. That is the purpose of the little, arrow.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
// FYI: The control template you need is nested inside the TreeViewItem and is actually a style for a ToggleButton.
This is that! Thanks! I just didn't know what reply for this!
ISQ 469907496
|
|
|
|
|
With a bit of hack we were able to use command to return the current value of the target (as well as IsEnable), so we could nicely update color pickers, etc... on the control tool bar.
Now the problem is we use lots of command in our application (about 300).
And every time the user key one char in we do heavy processing as well (relayouting and repainting all visual information), and now that we have command, on top of the heavy text processing we've got all command updating (it's the behavior of the input manager to fire up an update of the command sources on key up).
So... since we moved to command we suffer huge performance problem due to the above reason.
Is there a way to disable command updating for a little while (while typing text) or.
In fact, ideally, I would like to disable only some command updating (whereas text command should still update...)
Any tip?
|
|
|
|
|
Lloyd,
I'll send Josh Smith an email about this question and see if he has some advice for you.
Do you have 300 commands all enabled all the time?
Does this problem only happen on one control or one form, or is it application wide?
What sort of application is this?
modified 27-Feb-21 21:01pm.
|
|
|
|
|
well, I'm not really working there anymore but the problem still haunt me!...
the application could be found there: http://www.novamind.com/[^]
All the button/controls on the ribbon are command source. There are lots of them. Most are enable all the time (although one could argue that invisible control should be disable, I'm not sure about what happen the ribbon control is a 3rd party, anyway some panel have a lot button).
What really slow down the app is text imput.
The main view is a legacy GDI+ control. The input text box in the view is a custom made text view (not a subclass of TextBoxBas, but of Control with custom text rendering via interop with Uniscribe, but with good perf, as it is able to paste 400k of text rich with the same perf as word).
But in NM3 it was already limit, big map slowing the application perceply (as not only we should layout the text, but move all the map's graphics and the autolayouting algorithm is time consuming)
Anyway on each key up, all command state is re-evaluate, and although each is relatively quick individually text processing was already putting us down (not only the text control shold do the layout, but we might need to move/relayout all graphics on the map as well...)
because of that NM4 using WPF (& commands) is slower than NM3 were that there was no such unnecessary work on key up...
is it a bit more clear now?!?
|
|
|
|
|
Lloyd,
Thanks for your response. I've sent Josh an email. Let's see where he takes this. I'm interested in his opinion too.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Karl...If I want to get involved with a thread, I'll do so on my own.
:josh:
My WPF Blog[ ^]
All of life is just a big rambling blog post.
|
|
|
|
|
Sorry,
modified 27-Feb-21 21:01pm.
|
|
|
|
|
No problem, dude. I just sort of feel obligated to help out once someone mentions that they've asked me to reply to the thread. I'm pretty busy today and don't have time to help out. Damn day job!
:josh:
My WPF Blog[ ^]
All of life is just a big rambling blog post.
|
|
|
|
|
Maybe in the next couple of days. This question is beyond my skills to answer properly.
Have a great day and don't forget, "who loves ya!"
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Karl Shifflett wrote: Have a great day and don't forget, "who loves ya!"
Jesus?
Satan?
Captain Crunch?!
:josh:
My WPF Blog[ ^]
All of life is just a big rambling blog post.
|
|
|
|
|
You forgot Santa and Mole.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Good call! Also, Elvis might be on that list.
:josh:
My WPF Blog[ ^]
All of life is just a big rambling blog post.
|
|
|
|
|
Karl Shifflett wrote: don't forget, "who loves ya!"
That's easy. Paris Hilton, Pamela Anderson, Lindsey Lohan and the Josh Stalkerettes.
|
|
|
|
|
|
Indeed some interesting concept.
As I said I'm not working there anymore..
But I was thinking to soon start a pet project were I could test all of that. Will give it a try some day. Thanks for taking some times to think about it hey!
|
|
|
|
|
My pleasure to server.
True be told, your issue played a major role in my REALLY digging into this.
So... Thank you!
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Does anyone else have this problem or am I the only one? When scrolling an item collection the text of some of the elements flicker. For instance some elements in a dropdown control. This happens in my WPF applications and also in VS2008 Properties windows (like the elements in the list of the Background property)
Cheers,
Mircea
"Pay people peanuts and you get monkeys" - David Ogilvy
|
|
|
|
|
Mircea,
Some considerations:
What kind of video card are you running?
How much memory does it have?
Are the video drives up to date?
What is your monitor refresh rate set at in Control Panel? The default is 60 which is not good. Should be at least 72.
Do you have the lastest service pack installed for your versions of the Framework?
modified 27-Feb-21 21:01pm.
|
|
|
|
|
The video card is quite powerfull Nvidia QuadroFx 350M with OpenGL support with 256+256MB shared, the drivers are up to date but the refresh is 60Hz and cannot change this for the native resolution as it's the only one available. So that's that.
Anyway I was planning on suggesting WPF for the design of a new desktop application for a client but gradually finding out about all kinds of limitations is slowly making me reconsider the options.
What do you feel about adopting WPF for a business line application at the moment?
Cheers,
Mircea
"Pay people peanuts and you get monkeys" - David Ogilvy
|
|
|
|