In my project I need an application lock (same as windows lock). If the application is idle for a time period the application should be locked i.e, the login window for the application will appear. How can I do it in a WPF C# application?
...
Hi,
I'm having this strange issue with my ItemsControl grouping. I have the following setup:
<ItemsControl Margin="3" ItemsSource="{Binding Communications.View}" >
<ItemsControl.GroupStyle>
<GroupStyle>
<GroupStyle.ContainerStyle>
<Style TargetType="{x:Type GroupItem}">
<Sette...
I have two brushes. I don't know wath type of brushes they are. They can be ImageBrushes, SolidBrushes or VisualBrushes. I have each in a variable of the "Brush" type.
I need to combine two brushes. How do I do it?
I tried this. But It didn't work. Here are Back and Front the brushes that need to me combined.
Border Bd = new B...
When my appliactions starts up in the static void Main Methode I want to determine if a key like Alt or Ctrl is pressed and then start the Application in some kind of Option-Mode. How can I find out if a key is pressed during startup?
I found some samples already but they all import a windows dll.
Something I don't want to do.
...
I am attempting to build an application using WPF and the MVVM pattern. I have my Views being populated from my ViewModel purely through databinding. I want to have a central place to handle all exceptions which occur in my application so I can notify the user and log the error appropriately.
I know about Dispatcher.UnhandledExcepti...
I'm building a simple data entry app in WPF form using the MVVM pattern. Each form has a presenter object that exposes all the data etc. I'd like to use WPF Commands for enabling and disabling Edit/Save/Delete buttons and menu options.
My problem is that this approach seems to require me to add lots of code to the code-behind. I'm tryin...
I'm trying to use a WPF application on our Citrix server, and made a really simple window with a button and a textbox. When running the application, noting but the application name on top of the window is shown. Is it not possible to use WPF on Citrix, or is our Citrix server too old?
...
I'm trying to build an image viewer for 16-bit PNG images with WPF. My idea was to load the images with PngBitmapDecoder, then put them into an Image control, and control the brightness/contrast with a pixel shader.
However, I noticed that the input to the pixel shader seems to be converted to 8 bit already. Is that a known limitation ...
Hi Team,
I just came across this requirement, could find this URL is of close match but the source downloaded is corrupted.
http://blogs.msdn.com/adam%5Fnathan/archive/2005/10/24/using-com-interop-to-create-a-wpf-visualization-for-windows-media-player.aspx
Also how to add this visualization into Windows Media Player for playing audio f...
How can I trigger a Command in my ViewModel at the end of an animation/storyboard using XAML only.
...
I want to store image into my datatable and while adding colum I want to set its default value, sending you code doing with checkboxes..
public void addCheckBoxesRuntime(){
for (int i = 0; i < InformationOne.Length; i++)
{
dt = new DataColumn(InformationOne[i][1] + " (" + InformationOne[i][0] + " ...
Ok, I've got a reaaally simple bit of code here which is meant to set the borderless property of the printer to .. well, borderless!
So I try and set it, but no matter how much I try, the imagable area is never the whole width of the page, and therefore I cannot size the picture correctly for the paper before printing.
I've tried with...
hi, i tryed to build WPF application using Add-Type, but it failed.
$a = @'
using System.Windows;
public class Program
{
[STAThread()]
public static void Main(string[] args)
{
Application app = new Application();
Window1 w = new Window1();
app.Run(w);
} ...
I am looking for a good way to design a multi-column layout which reflows the controls in the columns according to the space available. I have a list of labels and fields which display information, and sometimes the view they are contained in needs to be tall and skinny, other times short and wide.
A simple solution is to use a WrapPane...
I've been looking at the following example on how to style the combo box, but I haven't been able to create a focus effect when going into a editable combo box. Whenever the combo box receives focus, it should go into edit mode and the component should have a focus style.
The basic problem is that whenever I go into the edit mode, it's...
Ok, I was programming an app that loaded merged dictionaries on runtime to change appearance and behaviour when I got stuck : some of the controls on my forms just weren't reacting to the styles I thought they had to react to.
I have tried to simplify the problem as much as I could and came up with something so simple that I'm afraid ...
Hey guys,
I have a custom WPF UserControl in a DLL file. I access the UserControl from PowerBuilder via OleObject (COM). I'm trying to create an instance of the UserControl (code in .NET dll).
Everything works fine when I'm using it via COM from C++, but in PowerBuilder, I'm getting this error message:
Error Message
Can you help me to...
I have a listbox where the items are styled using a ResourceDictionary style which is then attached to the ItemContainerStyle property. This gives my ListBoxItems a BorderThickness of let's say 1.
Now I want to collapse the items individually, so I use Visibility.Collapsed but for some reason the border that the ItemContainerStyle has c...
In my current application I have this little animation. It makes a full 360 degrees rotation of a canvas and works fine.
<DoubleAnimation
Storyboard.TargetName="WaitCanvas"
Storyboard.TargetProperty="(Canvas.RenderTransform).(TransformGroup.Children)[0]
.(RotateTransform.Angle)"
From="0" To="360" Duration="0:0:2"
AutoReverse="...
How would I create a validation rule to ensure Value2 has the same value as Value1? If a validation rule is not the best method then what would be better? I could have the TextChanged event handle this, but I'm wondering if there is something more elegant.
<TextBox Name="Value1TextBox">
<TextBox.Text>
<BindingPath Path="Valu...