Binding SQL table to DataGridView in WPF
How can I bound SQL table to datagridview in WPF? ...
How can I bound SQL table to datagridview in WPF? ...
Hello, I have a UserControl with a story board and I want to stop the animation when the control's Visibility changes. I created a Trigger to pause the animation and start it depending on the state, but I keep getting an ArgumentException. Here is the XAML: <UserControl.Triggers> <EventTrigger RoutedEvent="FrameworkElement.Loaded...
Let's say in some abstract ViewModel base-class I have a plain-old property as follows: public Size Size { get { return _size; } set { _size = value; OnPropertyChanged("Size"); } } I then create a more specific ViewModel, inheriting from the previous one, which contains the following property: public R...
I have previously used the arguments of a contentsResized event on a Winforms richtextbox to get the new size of my RTB. I am now developing a WinForms app with a custom WPF RichTextBox. My whole reason for doing this is to use the out-of-the-box spellchecker. I need my RichTextBox to expand and collapse vertically as the text is chan...
Hello, I have some objects with various collection properties that I'm displaying in a ListBox using a DataTemplate for the ItemTemplate. Within that DataTemplate is a TreeView which displays various properties as TreeViewItem children of a root TreeViewItem which represents the items being displayed in the ListBoxItem. My problem is ...
My organization is considering which technologies to use for our next generation of systems. We will be using .NET, but have not decided which user interface technology is best. Silverlight and WPF seem to be the most appropriate options. Can someone share the pros and cons of each approach? ...
Hi, I am looking at implementing PRISM into my next silverlight & WPF application. I have read quite a bit about it and have implemented several sub patterns already in projects BUT I wanted to check with the community if there are any major gotcha's that other developers have come across when using the PRISM pattern that I should keep...
I'm building a desktop application and I occasionally add images to the solution explorer. When I "Build" the application, I notice the .exe file increases in size. If I add an image that's 40kb, the .exe increases 40kb. All in all, my application is currently 12mb, and I think it's a bit too much for people to download. Is there a way...
I am trying to develop a touchscreen keyboard control in a C# WPF project that will be visible when a TextBox gets focus and is hidden when the TextBox loses focus. The projects I have seen for touchscreen keyboards have accomplished this by defining the keyboard as a new window rather than a control. For my application, I would really...
Hi, I am looking for help on Circle Packing in WPF. Similar to the following: http://www.cricketschirping.com/weblog/2007/06/18/processing-sketch-circle-packing/ Does anyone known of a circle packing algorithm for WPF? My ideal scenario is to be able to create something similar to the IBM Many Eyes Bubble Visualization. Any help o...
Hi all, I am a wpf newbie & loving it. However I have a layout problem which I hope someone can help me with. I need to build a persons attributes editor. These consist of 2 fixed attributes - first name & lastname, plus a variable bucket of other attributes such as age, sex etc. I have build a dialog consists of grid which contains 2 ...
Hi, Can anyone help with the following - been playing about with this but can't for the life of me get it to work. I've got a view model which contains the following properties; public ObservableCollection<Rule> Rules { get; set; } public Rule SelectedRule { get; set; } In my XAML I've got; <ListBox x:Name="lbRules" ItemsSource="{B...
I want to bind a command to a comboboxitem much like a typical command (either application or custom) is bound to a button. I can't seem to find an example. EDIT: The ComboBoxItem exists as part of a ContentControl that also contains a button. The button has an associated command that works well. How can I bind a command, in a simil...
I want to show ads on my Free WPF Application? Could you tell me how to do that? I just want to show ads and want to change ads after say 5minutes. ...
Hi guys, I have an ALPHA application which allows you grab an obfuscated font from and XPS file and store the .odttf file for use in Silverlight. The application "works" as in it does what it says on the tin, albeit in a very rough sort of way. In the process of cleaning this tool up to create the BETA I can across an issue. I want the...
In a WPF app I have objects, derived from a custom control: ... <MyNamespace:MyCustControl x:Name="x4y3" /> <MyNamespace:MyCustControl x:Name="x4y4" /> ... I can reference these objects, using names: x4y4.IsSelected = true; Also such function works well: public void StControls(MyCustControl sname) { ... ...
Hi, I'm implementing my own fake tabcontrol to look like IE8-tabs (I'm aware of other implementations of tabcontrol). My TabControl derives from Selector, and my TabItems derive from ContentControl. When a tab is selected i set IsSelected (a dependencyproperty) to true. My trigger looks like this: <Trigger Property="IsSelected" Value=...
Hi, I'm trying to customize the TreeView control. When a user selects an item in the TreeView, I need the ActualWidth of the selected item to be stored in the item's Tag: <Style x:Key="{x:Type TreeViewItem}" TargetType="{x:Type TreeViewItem}"> <!-- ... --> <Setter Property="Template"> <Setter.Valu...
Given a pack:// URI, what's the best way to tell whether a compiled resource (e.g. a PNG image, compiled with a Build Action of "Resource") actually exists at that URI? After some stumbling around, I came up with this code, which works but is clumsy: private static bool CanLoadResource(Uri uri) { try { Application.GetRe...
I have a WPF application which launches a WPF window. In the window, I want to double click an item in a ListView, which would open a WinForm. Will there be any side-effects in doing this? ...