|
Hi,
I am developing WPF custom controls. My problem is how can get an event when the user has deleted a control from the Cider (WPF designer). The Unloaded event is triggered for a control when its deleted from cider and also when the WPF Window is closed. I want a event which is fired only when a control is deleted from cider.
this.Unloaded += new RoutedEventHandler(ControlUnloadedCallBack);
.
.
.
private void FSFControlUnloaded(object sender, RoutedEventArgs e) {
}
thanks in advance,
Vinod C S
|
|
|
|
|
You can detect in code if you are in the designer, so put your code inside the event inside a block so it doesn't fire at runtime.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Hi,
Thanks for the answer.
but what I want to know is the exact event name which gets triggered when the control is deleted from the cider. can you tell the exact event which gets triggered?
Thanks,
vinod
|
|
|
|
|
Hi
I am new in WPF so in advance I apologize if it is just a simple question
I have a vector based (actually xaml based) image in the resources
and I want to have a button that just contain that image
and I don't want to have a button that just contain that image ,I want a button that does n't have the traditional standard shape of a button, I mean I want a BitmapButton only a bitmap I want to appear instead of button , nothing else
I have a code that do this but still show that standard view that I don't like
Please Tell me what should I do to eliminate that.
Thank you
P.S
Here is the code:
<Button Grid.Row="5" Height="75" Width="220" Padding="2" >
<ContentControl Template="{StaticResource Credit-Card}" />
</Button>
|
|
|
|
|
You'll probably want to change the template of the button to give it a different
layout. The section "Creating a ControlTemplate" in the Controls Overview[^]
has an example.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
Is there any way to use the Application Idle event in WPF? I want to display a message when the application goes to idle period of over 5 minutes. How can I achieve this? I am using WPF (C#) 3.5 SP1. Please guide me.
Regards,
- Kunal Chowdhury ( My Blog)
|
|
|
|
|
Idle in what way ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
idle means => user is not doing anything using any input (like: keyboard or mouse etc.). He is not using the machine for a long period (say about 5 minutes)
Regards,
- Kunal Chowdhury ( My Blog)
|
|
|
|
|
I can give you some hint..hope this help you..
Make some global variable say 'xyz' in app.xaml and initialize it to 0.
and take one timer whose code executes after each minute and increase value of variable 'xyz' by 1 and if it become 5, then write code what you want..
and for anything you do using keyboard or mouse input at that time make the value of 'xyz' to 0..
|
|
|
|
|
Dear Ravi,
Thanks for the suggestion. Actually I was not in desk at that time when u pinged me. I will check the same & will inform u tomorrow . Thanks again....
Regards,
- Kunal Chowdhury ( My Blog)
|
|
|
|
|
Ravi,
I checked the same. This will not help me in my case.
ravimori wrote: for anything you do using keyboard or mouse input at that time make the value of 'xyz' to 0..
This will be quite difficult if I use two many Windows in my application. This will also produce huge garbage code....
Lets see.... if anyone has any solution for that....
Hope, will get the answer soon....
Regards,
- Kunal Chowdhury ( My Blog)
|
|
|
|
|
Hi,
I just completed two articles on Silverlight. The first is real basic 1.0 stuff. The second is 2.0 and more architechuraly involved but geard toward developers. I would like some community feed back and any performance results you find while testing the code. I am working on an older Pentuim 4 willimina with low memory. I'm getting bad performance results, I'd like to know what beefier systems report.
Thanks in Advance,
~TheArch
|
|
|
|
|
|
I am curious to put my Out Of Browse application in Notification Area (Tray Icon). Especially when user minimizes my Out of Browser applications it should keep one ICON in Notification Area. Once he gets some alert or To-Do operation, it will show one “Notification Window” (like Outlook New Mail Notification Window). Is it possible to these kind of operations in Silverlight
|
|
|
|
|
I'm pretty sure the trust restrictions of Silverlight apps
will prevent you from using the system tray.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
thank you Mark,
Can we customize Silverlight by extending dll's or can we use any third party controls to take care of Tray Area from Silverlight Out Of Browser application..
I am looking for these from long time, I believe once we get these futures we can do lot for our clients.
thank you,
-nm reddy
|
|
|
|
|
Silverlight is a browser plugin and thus is meant to be cross-platform compatible.
The notification area is Windows specific. It's unlikely we'll see this
feature in Silverlight any time soon.
You should use WPF for full trust, full .NET framework features.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
You can't do this because Silverlight is meant to respect the security Sandbox of the browser. That means that there are lots of operations you can't do such as interact with the desktop or file system outside of Isolated Storage. This is important because it helps to protect you from downloading malicious content from outside sources.
If you need desktop interaction, write a WPF application and download it using Click Once.
"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 am streaming a video using a VLC player swith UDP option. So that I can open the stream from any other PC's VLC player using the URL. For example udp://@239.239.239.1:1234
But I am trying WPF MediaElement to open the stream and it is not working with a xaml file. Please help me how I can I play a VLC stream on a XAML file.
Thanks
jklanka
|
|
|
|
|
The MediaElement control, is basicallly Windows Media Player under the hood. So, if WMP can't play it, neither can the MediaElement.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Hi All,
Im new to this platform. How to design an entire screen dynamically at run time using WPF 2008(C#)?
Can any one help me... Thanks in advance...
|
|
|
|
|
|
Thanks for ur reply.
Now i need to add WPF CheckboxList at runtime time based on the Input values.
For example,If the user selects 2 SQL tables,I ve to dynamically create 2 CheckBoxlist controls for those tables with their corresponding table fields.
Can any one pls help me...
Thanks in advance...
|
|
|
|
|
Related to my attached properties question, I created a style based on the original style, like so:
<Style x:Key="UDPGlobalGridViewStyle" TargetType="{x:Type udpcontrols:UDPTelerikGridView}"
BasedOn="{StaticResource UDPRadGridViewTopTitle}">
<Setter Property="udpcontrols:UDPTelerikGridView.TitleBarVisibility" Value="Visible" />
<Setter Property="udpcontrols:UDPTelerikGridView.TitleBarBackground" Value="Black" />
<!--<Setter Property="udpcontrols:UDPTelerikGridView.TitleBarBorderBrush" Value="Black" />-->
<Setter Property="udpcontrols:UDPTelerikGridView.TitleBarBorderThickness" Value="1" />
<Setter Property="udpcontrols:UDPTelerikGridView.TitleTextForeground" Value="White" />
<Setter Property="udpcontrols:UDPTelerikGridView.TitleTextFontFamily" Value="Arial" />
<Setter Property="udpcontrols:UDPTelerikGridView.TitleTextFontSize" Value="16" />
<Setter Property="udpcontrols:UDPTelerikGridView.TitleTextFontWeight" Value="Bold" />
<Setter Property="udpcontrols:UDPTelerikGridView.TitleTextFontStyle" Value="Italic" />
<Setter Property="udpcontrols:UDPTelerikGridView.GridPrintButtonVisibility" Value="Hidden" />
<Setter Property="udpcontrols:UDPTelerikGridView.GridExportButtonVisibility" Value="Visible" />
<Setter Property="udpcontrols:UDPTelerikGridView.GridExportButtonIsEnabled" Value="True" />
</Style>
The line that's commented out generates the following compiler error:
Ambiguous match found
I don't know why.
EDIT/SOLUTION ----------------------------
The problem was the result of too hastily copy/pasting. Two of my Get properties had the same name and returning different types.
"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." - Jason Jystad, 10/26/2001
modified on Friday, June 26, 2009 9:38 PM
|
|
|
|
|
Change the style name - see if it works OK with a different name. I suspect you have a conflict where the Key is declared twice, but in different cases.
"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
|
|
|
|