|
I'm sorry but I don't understand your question.
If you have already moved to Silverlight, then why are you wondering about using WPF via clickonce or in a browser?
|
|
|
|
|
Well I feel like I may be missing out, WPF has a larger feature set than Silverlight but it seems they are all around the trust issues.
Really I'm looking for a benefit comparison, there are a number of feature comparisons that seem to point out limitations in Silverlight and how to get around them, out of browser and elevated trust mainly.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Have a look at this guidance[^]. I have found it very useful.
Maybe it can help you too.
[Unfortunately its a little old now - 2009 release]
|
|
|
|
|
Thanks, a little light reading - 70 pages, still it does look interesting. I'd be surprised if the fundamental differences have changed with SL5
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello,
I have a button which has 2 labels. I want the labels foreground to be black on mouse over button and white when mouse is not over button.
I used this :
<Style TargetType="{x:Type Label}" >
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Foreground" Value="Black"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="false">
<Setter Property="Foreground" Value="White"/>
</Trigger>
</Style.Triggers>
</Style>
But the thing is that label foreground is changed only when i am over the label. so one label is black and second is white.
How can i solve this so when mouse is over the button, it's children labels will use this style?
|
|
|
|
|
You only need to supply one trigger. What you do is define the standard style, and as you have a boolean condition, the other condition will be applied when appropriate. Here's what I mean:
<Style TargetType="{x:Type Label}">
<Setter Property="Foreground" Value="Black" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="False">
<Setter Property="Foreground" Value="White" />
</Trigger>
</Style.Triggers>
</Style> As you can see, you have a default style which gets overriden by the trigger, and when the trigger no longer applies, it reverts back to the default style.
|
|
|
|
|
Right but that's not what i meant.
I meant that i have a button with 2 labels. But only one of them becomes black when mouse is over one of them , and second label stays white. i want a functionality that when mouse is over the button, both labels will be black.
|
|
|
|
|
Ahh, I see. Well, you need to give the label you are interested in a name, and use TargetName in your style trigger setter to change the style. The actual style you have as the main style should be Button not Label.
|
|
|
|
|
Your trigger is applied to a label, not to the button. Because "IsMouseOver" is a property of an individual label, the other label on the button is not influenced.
Could you also provide the code of your button?
|
|
|
|
|
Hello,
I have a button which opens a popup. In my xaml code behind i use:
private void dropDownbtn_Click(object sender, RoutedEventArgs e)
{
MenuPopUp.StaysOpen = true;
MenuPopUp.IsOpen = true;
MenuPopUp.StaysOpen = false;
}
The thing is that i want to put this code into xaml using event trigger (click on button) and setter with binding element as menuPopUp and set it's properties.
Can i do it in xaml? i mean set the same property twice (once true and once false)? I mean for the statysOpen property.
BTW, i am doing this because otherwise popup will be opened and closed automatically on button click so popup will never be shown.
|
|
|
|
|
Hi Everyone,
Does anyone know how to snap polygon to another polygon edge or vertex when they closely? like this one
I already knew how to snap to grid lines,
but I have no idea how to snap polygon to polygon
I used C# and WPF.
Does anyone have any good ideas?? Thanks.
|
|
|
|
|
Hi iamnewguy,
I'm actually looking for the same functionnality, I had drag google without any good answers,
did you finaly manage to snap your polygons together ?
thank you !
|
|
|
|
|
Hi
In my WPF application i'm using an Entity Data Model to access data.
Whem my application start i load the connectionstring from a file and i pass it to the EntityDataModel trough its constructor.
SuiteStoreEntites issEntities = new SuiteStoreEntities(connectString);
The connection string parameter is :
metadata=res://*/Data.SuiteStoreModel.csdl|res://*/Data.SuiteStoreModel.ssdl|res://*/Data.SuiteStoreModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=.\\SQLEXPRESS;Initial Catalog=SuiteStore;Integrated Security=True;MultipleActiveResultSets=True;Application Name=EntityFramework"
And i get the following error in the EntityDataModel's designer: Argument Exception Occured Keyword 'data source' is not supported.
public SuiteStoreEntities(string connectionString) : base(connectionString, "SuiteStoreEntities")
{ ... }
<pre>
<div class="signature">
</div>
|
|
|
|
|
in this statement.
connection string=;"Data Source=.\\SQLEXPRESS remove the ";".
connection string="Data Source=.\\SQLEXPRESS
To build a correct connection string look at this link.
connection string="Data Source=.\\SQLEXPRESS[^]
|
|
|
|
|
How I can understand how the principle of binding in WPF?
how I can connect things to do with the commands in MVVM pattern?
|
|
|
|
|
One of the easiest ways to get started in MVVM is with this[^] article. You can also get MVVM In The Box[^] training.
|
|
|
|
|
|
|
Hello,
I have a button which opens a popup.
I want the option - if user clicks in any place outside of this button or popup so it will be closed. otherwise it will be on screen.
How can i do it?
|
|
|
|
|
Try to grab focus and then when when the click event does not occur on the popup, close the popup.
To get the click event and check if the mouse pointer is not within the popup frame, use GetVisualDescendants .
|
|
|
|
|
how to use this GetVisualDescendants ?
|
|
|
|
|
|
|
Have a look here[^] for an example.
|
|
|
|
|
Hi,
Can anybody please tell me,
How I can move the expand collapse to the right hand side, instead of default left hand side ?? without changing the left side margin..
i mean tree view should be same as it is but the expand collapse only should move to right
|
|
|
|