I am building a WPF application that calls web services and displays the data returned from the service after being broken down and analyzed by my application. The problem that I am facing is with multithreading. One of the API calls is made using a DispatcherTimer every 60 seconds. The issue is that when this event fires, it blocks t...
I need to instantiate WPF types (say, a UserControl or a Page) via reflection for a designer. The problem I'm having is that when I attempt to instantiate these using Activator.CreateInstance I get a TargetInvocationException which wraps, in the end, an exception thrown by the StaticResource markup extension.
Clarification: The types ...
Hello.
How do I set the TabItem.Header to bindings taken from few fields, each binding shown in a different size, all in the place of the original header text; without overriding the default style and behavior of the header - I only need the text.
I tried to set its template but then it creates a rectangle that contains the inner contr...
I have a WPF application that makes use of the PreviewKeyUp function to handle keystrokes before they might otherwise be dealt with.
It works fine, but often (not always) if I switch to another windows application and then back, it just stops working. If I interact with anything on the form that can accept focus (say a button, or a tex...
Hi,
I am trying to make resources for setting the Text ForeColor by doing the following in a Resources.xaml file
<SolidColorBrush x:Key="windowsTextForeColor"></SolidColorBrush>
<SolidColorBrush x:Key="windowTextBackColor"></SolidColorBrush>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="Background" Value="{DynamicResou...
The WPF Canvas has a coordinate system starting at (0,0) at the top-left of the control.
For example, setting the following will make my control appear on the top-left:
<Control Canvas.Left="0" Canvas.Top="0">
How can I change it to the standard cartesian coordinates?
Basically:
(0,0) at center
flip Y
I noticed this post is...
Hi when I do in one of my user controls in a WPF application,
this.KeyUp += new System.Windows.Input.KeyEventHandler(MultipleControlViewer_KeyUp);
or
this.KeyDown += new System.Windows.Input.KeyEventHandler(MultipleControlViewer_KeyUp);
or
this.AddHandler(Window.KeyDownEvent, new System.Windows.Input.KeyEventHandler(MultipleControlViewe...
when i use a popup, it seems to hang around. in the code below i attach a popup to a textBox using by overriding the control template, and make the popup appear when the TextBox has focus. When you tab to the next on screen element the popup goes away, but if you just alt-tab to a different application the popup stays there in the foregr...
How to design a scrollbar/Slider like MSCUI Patient Journey Demonstrator - Patients charts page and Most Recent Activities (not the normal scrollbar)? I require the scrollbar/ slider which shows the Year data on the left and Bottom side of the above options. I don't know exactly what type of controls that is and pls help me. Any kind of ...
My application requires that changes made in the WPF DataGrid control are saved back to the DataTable.I have managed to save data from the DataGrid to DataTable, however, the data saved from the DataGrid does not show the changes I have made, it just shows the data that was already there when the DataGrid was first populated.
I have got...
actually there is a way described in http://social.expression.microsoft.com/Forums/es-ES/wpf/thread/6be8299a-9616-43f4-a72f-799da1193889
[System.Runtime.InteropServices.DllImportAttribute("user32.dll", EntryPoint = "SetCursorPos")]
[return: System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedTyp...
How to properly handle listview's last column sizing in such a way that:
listview does not display the ugly and unused 'extra' column (see picture 1, or here for example)
the (actual) last column is stretched to fill the remaining space
the horizontal scrollbar is not shown
resizing in any direction leaves no artefacts (see below)
I'...
Hi,
Is it possible to transalte/rotate/scale items without a ScatterView? I want to manipulate items which can be on top of other elements like a button, list or a custom control which should be static . When I add them to a ScatterView, they all become ScatterViewItems which is not the desired effect.
Thx!
Maarten
...
I created a WCF service library project in my solution, and have service references to this. I use the services from a class library, so I have references from my WPF application project in addition to the class library. Services are set up straight forward - only changed to get async service functions.
Everything was working fine - un...
Hello!
i have a simple checkbox
<CheckBox IsChecked="{Binding ForceInheritance}"/>
In Code i have a class with "INotifyPropertyChanged" and the Property
public bool ForceInheritance
{
get { return forceInheritance; }
set
{
if (forceInheritance != value)
{
value = SomeTest();
if (forceInheritance != value)...
This is what I want: I have a custom Panel which arranges a certain type of item. My Panel also has a few dependency properties (ArrangeMode, MinDate, ...), which influence the rendering. Example:
<TimeLinePanel ArrangeMode="Compact" MinDate="...">
<TimeLineItem ... />
<TimeLineItem ... />
</TimeLinePanel>
To be able to data-b...
Can't find anchor property in WPF, was it reconstructed to Horizontal and Vertical Alignments?
Is it the same?
I wanted to stretch my control in both sides (right and left), but it worked rather different than anchor
...
I want let the user choose what style my application has.Small example would be 2 buttons, if user presses button 1 then the background color turns red, if the user presses button 2 then the backgroundcolor turns green.
How do i do that? do i use multiple resource dictionaries? and apply them when the button is pressed? Whats the most ...
Hey
I display images in my WPF app using BitmapImage.
However, I would like an easy way to save these (as JPG) to a different location (ideally into a Stream or object that can be passed around)
Is it possible using BitmapImage or do I have to use other means? If so what other means are there for either loading an Image and saving as J...
Hello,
I am currently binding an ElementFlow control to an observablecollection of BitmapImages. My elementflows datatemplate is set up to decorate each item with a blue border.
However, I was wondering if someone with experience in using FluidKit could advise me on how to set the ItemTemplate of individual BitmapImages based on certai...