expression-blend

WPF WebBrowser - How to Zoom Content?

℡╲_俬逩灬. 提交于 2019-11-26 16:56:16
问题 Trying to test basic browser concepts in a WPF (C#/XAML, .NET 4.0) WebBrowser application. So far, the only problem is programatically zooming. Has anyone had any experience with this? MSDN lists nothing: http://msdn.microsoft.com/en-us/library/system.windows.controls.webbrowser.aspx Additionally, I have tried various things such as RenderTransform options to no avail. Either this is not possible or not documented. I'm hoping for the latter. Note that a WinForm solution isn't acceptable.

Windows Phone 7 (WP7) Change a button's background color on click

£可爱£侵袭症+ 提交于 2019-11-26 12:09:13
This seems like a really, really simple problem, but I can't figure it out. The culprit appears to be WP7's default style. It changes the background color to white when a button is clicked, then back to the button's default background. The problem I have is I want to change the button's background when the button is clicked. I can't find any possible way to do this. I've tried setting the background in code, but that does nothing. I think it's being overwritten by the default style. I've tried using a Property Change behavior in Blend, but that has the exact same result. I've tried creating a

Is there a way to check if WPF is currently executing in design mode or not?

这一生的挚爱 提交于 2019-11-26 11:34:32
Does anyone know of some global state variable that is available so that I can check if the code is currently executing in design mode (e.g. in Blend or Visual Studio) or not? It would look something like this: //pseudo code: if (Application.Current.ExecutingStatus == ExecutingStatus.DesignMode) { ... } The reason I need this is: when my application is being shown in design mode in Expression Blend, I want the ViewModel to instead use a "Design Customer class" which has mock data in it that the designer can view in design mode. However, when the application is actually executing, I of course

MVVM Passing EventArgs As Command Parameter

依然范特西╮ 提交于 2019-11-26 06:25:22
I'm using Microsoft Expression Blend 4 I have a Browser .., [ XAML ] ConnectionView " Empty Code Behind " <WebBrowser local:AttachedProperties.BrowserSource="{Binding Source}"> <i:Interaction.Triggers> <i:EventTrigger> <i:InvokeCommandAction Command="{Binding LoadedEvent}"/> </i:EventTrigger> <i:EventTrigger EventName="Navigated"> <i:InvokeCommandAction Command="{Binding NavigatedEvent}" CommandParameter="??????"/> </i:EventTrigger> </i:Interaction.Triggers> </WebBrowser> [ C# ] AttachedProperties class public static class AttachedProperties { public static readonly DependencyProperty

Is there a way to check if WPF is currently executing in design mode or not?

只愿长相守 提交于 2019-11-26 03:34:21
问题 Does anyone know of some global state variable that is available so that I can check if the code is currently executing in design mode (e.g. in Blend or Visual Studio) or not? It would look something like this: //pseudo code: if (Application.Current.ExecutingStatus == ExecutingStatus.DesignMode) { ... } The reason I need this is: when my application is being shown in design mode in Expression Blend, I want the ViewModel to instead use a \"Design Customer class\" which has mock data in it that

MVVM Passing EventArgs As Command Parameter

五迷三道 提交于 2019-11-26 01:57:07
问题 I\'m using Microsoft Expression Blend 4 I have a Browser .., [ XAML ] ConnectionView \" Empty Code Behind \" <WebBrowser local:AttachedProperties.BrowserSource=\"{Binding Source}\"> <i:Interaction.Triggers> <i:EventTrigger> <i:InvokeCommandAction Command=\"{Binding LoadedEvent}\"/> </i:EventTrigger> <i:EventTrigger EventName=\"Navigated\"> <i:InvokeCommandAction Command=\"{Binding NavigatedEvent}\" CommandParameter=\"??????\"/> </i:EventTrigger> </i:Interaction.Triggers> </WebBrowser> [ C# ]

How to add a Blend Behavior in a Style Setter

回眸只為那壹抹淺笑 提交于 2019-11-26 01:44:54
问题 I have crated a Blend behavior for Button. How can I set that to all of my Buttons in the app. <Button ...> <i:Interaction.Behaviors> <local:MyBehavior /> </i:Interaction.Behaviors> </Button> However, when I try: <Style> <Setter Property=\"i:Interaction.Behaviors\"> <Setter.Value> <local:MyBehavior /> </Setter.Value> </Setter> </Style> I get the error The property \"Behaviors\" does not have an accessible setter. 回答1: I had the same problem and I've come up with a solution. I found this

How to add a Blend Behavior in a Style Setter

强颜欢笑 提交于 2019-11-25 18:55:10
I have crated a Blend behavior for Button. How can I set that to all of my Buttons in the app. <Button ...> <i:Interaction.Behaviors> <local:MyBehavior /> </i:Interaction.Behaviors> </Button> However, when I try: <Style> <Setter Property="i:Interaction.Behaviors"> <Setter.Value> <local:MyBehavior /> </Setter.Value> </Setter> </Style> I get the error The property "Behaviors" does not have an accessible setter. I had the same problem and I've come up with a solution. I found this question after I solved it and I see that my solution bears a lot in common with Mark's. However, this approach is a