|
I am using WPF .Net 4.0 and I have a Window that populates a number of controls with data from a file. These are all within a DockingManager ContentControl which I then have its IsEnabled property bound to a global boolean variable. Now when the window first loads, it is correctly enabled or disabled based on what default value I set to it. However when I select "Edit Network" from my context menu, I update the global bool, which does update when I put a breakpoint, but the ContentControls IsEnabled property does not get set. Any ideas as to why this may be? Is there a view update I need to call or something?
<ContentControl Name="contentCtrlValues"
syncfusion:DockingManager.Header="Current Values"
syncfusion:DockingManager.CanAutoHide="False"
Visibility="Visible"
syncfusion:DockingManager.State="Document"
syncfusion:DockingManager.CanDock="False"
syncfusion:DockingManager.CanFloat="False" IsEnabled="{Binding Path=NetEnabled,
ElementName=window1, Mode=TwoWay}">
private Boolean bNetIDEnabled = false;
public Boolean NetEnabled
{
get { return bNetIDEnabled; }
set { bNetIDEnabled = value; }
}
private void HandleEditNetwork(object sender, RoutedEventArgs e)
{
NetEnabled = true;
}
|
|
|
|
|
You actually need to raise a notification to tell the binding object that the property has changed. This relies on you using the INotifyPropertyChanged interface and raising a PropertyChanged event naming the NetEnabled property.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
|
You are welcome. Good luck.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
OK
You have two ways to do that, you either implement the INotifyPropertyChanged interface or simply change this CLR property to dependency property to let wpf handle notification
|
|
|
|
|
Thanks for the help! Going to go try this out now.
|
|
|
|
|
I am making a custom tooltip control, (derived ftom tooltip), and wondering if there is some simple way to make the tip clickable, (url and close button). I have managed to 'fake' it, using mouse capture and previewmousemove, but wondering if there was an easier way?
Thanks,
j
|
|
|
|
|
You can use a button that you apply a tool tip control on it as a control template
|
|
|
|
|
If only it were that easy.. I have tried deriving the control from other elements, but if you use the tooltip in a standard way, (as below), it does not work correctly. I have managed to get this working using capture and manipulating mouse input, good enough for now unless another solution becomes available.. thanks
<Button.ToolTip>
<vht:vhToolTip HasDropShadow="True"
Opacity="0.9"
Header="Test Header: Tip 3"
Hyperlink="http://www.the-noc.net"
Text="this is just a bunch of tooltip text"
ImageSource="/Images/13.ico"
HasCloseButton="True"
HyperlinkClicked="vhToolTip_HyperlinkClicked"/>
</Button.ToolTip>
</Button>
|
|
|
|
|
If I were you, I'd look at substituting this by using the AdornerLayer and creating a mocked up tooltip that gives you the elements you want.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hey Pete,
Do you mean scrap the custom control all together?
|
|
|
|
|
Not quite - I mean show your control in the AdornerLayer in place of showing the ToolTip.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
That's a thought.. I'll try it out
thanks
|
|
|
|
|
Good luck. Let me know how you're getting on.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hi all,
I have two projects in same solution : 1 WCF project and 1 silverlight project.
WCF project start at port : 54432
Silverlight project start at port : 55647
i deploy WCF project on IIS and copy ClientAccessPolicy.xml and CrossDomain.xml into wwwroot folder. From SL project, i add reference service to WCF on IIS. It's run.
But from SL project, i add reference service to WCF project in same solution and run. I found the error about cross-domain. I already added ClientAccessPolicy.xml and CrossDomain.xml into the root of WCF project. The same error is displayed.
Could you please guide me to solve it? Any helps will be welcomed
|
|
|
|
|
|
I installed VS2010 and SL4 (with tools and toolkit), and I can't get the debugger to stop anywhere in the code in a silverlight (v4) app - not even the first line of the constructor in App.xaml.cs.
Can anyone help?
(and before anyone asks, yes, the solution configuration is set for debug)
SOLUTION ======================
It seems that it's because FireFox executes plug-ins out-of-process, so the debugger can't attach to the appropriate process. The fix is described here:
On MSDN Connect[^]
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
modified on Sunday, July 4, 2010 9:45 AM
|
|
|
|
|
John Simmons / outlaw programmer wrote: the solution configuration is set for debug
But perhaps it's missing this[^]?
/ravi
|
|
|
|
|
Nope, that's checked.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Ran across something similar in VS2008 where the start project was set to the .web project, changing the start project to the main project fixed the problem - just a thought
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
It still doesn't stop (and I get a warning that if I don't set the web project as startup, I can't debug the RIA services stuff.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Do you have Visual Web Developer installed? When you install VS 2010, it includes this but in case you have chosen a different mode of install and omitted the Visual Web developer then it could be an issue. Do check and see.
-Mamta
|
|
|
|
|
I have "Visual Studio Web Authoring Component", but that was installed with VS2008.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Found this thread - it might help you.
Note: The workaround suggests that if VS2010 is run in administrator mode, this problem goes away.
|
|
|
|
|
Nope - it has no effect. I wonder if it's because I have VS2008 and all the SL3 stuff installed...
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|