wpf

Ribbon Quick Accsess Toolbar Save Load

How can I save and load QAT programmatically? ...

How do I change the application orientation of a Surface application

I need to rotate the UI 180 degrees of my surface application in runtime when a user presses a button. How do I do this? ...

Is there a way to increase performance on my simple textfilter?

Hey guys, I'm writing a filter that will pick out items. I have a list of Objects. The objects contain a number, name and some other irrelevant items. At the moment, the list contains 200 items. When typing in a textbox, i'm looking if the string matches a part of the number/name of the objects in the list. If so, add them to the listbo...

WPF - Binding an ObservableCollection Dependency Property within a UserControl

I have a control class DragGrid : Grid { ... } which inherits from the original grid and enables dragging and resizing its child elements. I need to bind a custom DP named WorkItemsProperty to an observable collection of type WorkItem (implements INotifyPropertyChanged). Each element in the grid is bound to a collection item....

Some questions about focus on WPF

Hello, I've a little problem about focus on WPF. I whant to create a window, always on top, and that never get the focus (even if we click on it). Here's my solution : public partial class SkinWindow : Window { public SkinWindow() { InitializeComponent(); Loaded += ( object sender, RoutedEventArgs e ) => SetNoA...

WPF: How to autosize Path to its container?

I have a Path that must resize to its StackPanel container. <StackPanel x:Name="TrackSurface"> <Path Fill="AliceBlue" Stroke="Black" StrokeThickness="1" Data="{StaticResource TranslateZ}"> </Path> </StackPanel> I think about using a transformation bound to the container but don't know how to it actually. Ca...

Wpf Listbox and Togglebutton

Hi iam using a listbox to show a list of items. in the listbox i ahve an togglebutton on every item. When i click on the toggle button the state of the togglebutton is pressed. But when i am scrolling down in the listbox and scolls up again. The togglebutton state is not pressed. How can i prevent this please help. Heres my itemtemplate...

How do I use UI Automation on a WPF ItemsControl that groups items?

I am using Microsoft UI Automation (i.e. AutomationElement) to run automated acceptance tests against my application. This has gone well, but I've hit a situation that doesn't appear to be exposed to the automation framework. I have an ItemsControl (although I could be using one of its derived controls, e.g. ListBox) and I am using Coll...

How to set Border.BorderBrush from string

Theres a problem. I can't set value of BorderBrush fros C#-code (not in XAML): ((Border)((Image)sender).Parent).BorderBrush = "#FFBCC7D8"; How to solve this problem? ...

Change Rectangle Fill Based on ColumnWidth of a grid

Essentially i want to do as the title says, if the columnwidth is .50 then the rectangle should be red, if it's .75 then it should be amber, and if it's 1 then it should be green. I thought I could achieve this with DataTriggers but for some reason I am getting "Object Reference Not Set To An Instance Of An Object" error, here is my cod...

WPF/C#: Images rotating from a listview?

I just want ask for your comments/suggestions on how to create a customized listview (if that's a good implementation) in WPF that displays images coming from a table from a database (more like a playlist) that rotates similar to a film (moving horizontally - on loop) Any ideas? ...

How to make a SOAP/WSDL client in C#?

I have been playing around in PHP with it and got something to work, what i did was: $client = new SoapClient("http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl"); $fetchedArr = $client->GetCityForecastByZIP(array("ZIP" => "10451")); //get the weather in the bronx YO! And now i would like my application i WPF/C# to do the same. What is ...

Call Method from Linq query.

Hello Everybody, I am using Linq query and call method Like.. oPwd = objDecryptor.DecryptIt((c.Password.ToString()) it will return null value. Means this will not working. how I Resolve this. Thanks.. var q = from s in db.User join c in db.EmailAccount on s.UserId equals c.UserId join d in db.POPSettings on c...

how to create WPF TreeView with Columns and two types of items

I'm trying to create a treeview in which I would have a list of items (containing info about emails) grouped according to the email subject. I want something similar to the bottom image I first tried using ListView. I got some helpful suggestions how to do it on this forum, but none worked completely. Using GroupDescriptions I was abl...

LoginViewModel in Wpf Application Framework

Hello , You wrote: "I would use an ApplicationController which instantiates the LoginViewModel and shows the LoginView. When the user proceeds with the login screen the ApplicationController closes the LoginView and shows the MainView with its MainViewModel. How this can be done is shown in the sample applications of the WPF Applicati...

Grouping in datagrid - rows not getting displayed

Hello, I have to group the data int the datagrid. I have done following for that: Have added the style to resources as: > <Style x:Key="GroupHeaderStyle" > TargetType="{x:Type GroupItem}"> > <Setter Property="Template"> > <Setter.Value> > <ControlTemplate TargetType="{x:Type GroupItem}"> > ...

XAML ToolTip + IsHitTestVisible="False"

We need to have mouse clicks and drags "ignored" by our View1 but the ToolTip must still function in that view. The reason is View1 is above View2 in Z-Order, so View1 can tint View2 a red color and show a warning via ToolTip; however the ToolTip accompanying View1 will not work if IsHitTestVisible="False". Anyone know a work around so...

Adorning a non-DependencyObject with a DependencyProperty

I'm trying to bind to a WinForms control's DataSource property in my WPF application but I'm not having much luck... Falafel.com gives it a shot, but although it claimes that a DependencyObject is not required to perform the binding, that seems to be the only way of doing it. Has anyone done this before? ...

Advice on WPF reporting

Hi Robert, I saw an answer from 2009 that indicated you have used Stimulsoft for WPF reporting. I am in need of a WPF reporting tool currently and I'm not sure what direction to go. I've looked at a couple of third party options (DevExpress, Infragistics, ComponentOne and Stimulsoft) as well as using native XPS Flow/Fixed document app...

WPF + MvvM + Prism

Hi all, I am new in the Wpf & Mvvm world , but I have found a couple of examples and just found that there is some different way to instantiate the model. I would like to know the best/correct way to do it. both ways are using Unity What I've foud: var navigatorView = new MainView(); navigatorView.DataContext = m_Container.Resolve<INav...