I have the following method which adds a new column to a Telerik RadGridView:
private void CreateNewColumn(FieldDescriptor fd, uint fieldno) {
fieldGrid.Columns.Add(new GridViewDataColumn() {
UniqueName = fd.fieldName,
Header = fd.displayName,
DataMemberBinding = new Binding("Fields[" + fieldno + "]"),
...
I use LINQ to SQL in a WPF project. I have made small changes in the database (changed datatype of the fields, which contain no data).
Now I want to regenerate (refresh) the LINQ to SQL DataContext of this project (I use VS 2008). I try to right-click on .dbml item in my Solution Explorer and choose "Refresh", but nothing happens.
How ...
I have been fighting this issue for some time so today I started a new project and simplified things to the basics. What I want to do is have a listbox, bound to a collection with a detail view of the selected item shown below. It all works fine except the items that refer to other tables simply show the foreign key. I was able to resolv...
I am trying to use a datagrid whose first column is a comboxbox. This combobox has a hardcoded static values, possible values are: "Employee, Contractor, Supplier"
How can I show some static values in the datagrid without binding to a datasource.
I am new to WPF so more detailed explanation would help.
...
I need selected item of Listbox1 to provide XmlDataprovider source for second Listbox.
Listbox1 uses:
<XmlDataProvider x:Key="CategoryXML"
Source="C:\Category.xml"
XPath="category"
/>
Ex: Category.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<main>
<category>
<name>Local</n...
I'm making a WPF program which is able to color the rows in a datagrid one by one in red using the 'for' loop and I've encountered something weird. If the datagrid has more than 40 rows of data from a database table, it doesn't color all the rows.
Here's the code I'm using.
private void Red_Click(object sender, RoutedEventArgs e)
{...
I am using WPF and the DocumentViewer to display a document. However, when I use DocumentViewerBase.Print, it gives the "standard" Windows dialog box asking me to choose a printer with the default already selected. How can I get rid of this? I just want to use a Print method that will automatically start printing with no other prompt in ...
I'm working on a WPF application, which I would like to be able to have a user drag the main window, and it will Dock when it approaches the end of the screen.
Is there a way to do this?
...
So I need to procedurally generate a background image for a grid, it only takes .1sec.
So I can wire into the SizeChanged event, but then when you resize the chart, it goes and fires the even maybe 30 times a second, so the resize event lags out signifigantly.
Does anybody know a good way to wire into the resize event and test weathe...
Hi,
i m using this code in .xaml,
as i created userdefined control(textbox) NumericTextbox
<local:NumericTextBox Grid.Column="1"
local:NumericTextBox.Mask=" Decimal"
local:NumericTextBox.MaximumValue=" 255"
local:NumericTextBox.MinimumValue=" 0"
Name="abc"
Grid.Row="0"
Text="{Binding Path = IPA...
I have a fullscreen window, and I want to prevent pop up windows that appear at the right bottom corner of my screen. I set the Topmost property to true, but apparently it does not help. I also tried activating the form and giving it the focus once it got deactivated, but that did not help either. What is a way to ignore such windows whi...
Hi, right now, I'm learning WPF. Can we change other WPF object's property when an WPF object's property if changed ?
Below is simplified scenario.
I have a Window with a TextBox named m_Text and a ToggleButton named m_Button. I want to change the m_Text.Background property if m_Button is pressed, that is m_Button.IsChecked = true. I t...
How do I create the following shape in XAML?
<Ellipse Height="100" Width="100">
<Ellipse.Fill>
???
</Ellipse.Fill>
</Ellipse>
LinearGradientBrush can't be transformed in this way?
RadialGradientBrush is not suitable either.
Any ideas?
...
Hi,
Can anyone help to remove the queued events in the dispatcher.
...
Hi all,
I'm using :
SendKeys.SendWait("+{PRTSC}");
InteropBitmap interopBitmap = System.Windows.Clipboard.GetData(System.Windows.DataFormats.Bitmap) as InteropBitmap;
On my computer, everything is ok.
On another computer, I get an OutOfMemoryException.
Why ?
How to solve it ?
Thanks in advance for your answer
...
How to remove all the associated in built events of a control in WPF?
...
Here's my 'sample code', including what I'm trying to do. Obviously, it doesn't work at the moment, but is there any way I can make it work?
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:System="clr-namespace:System;assembly=msco...
Hello
I´m creating a XAML template for the WPF ProgressBar. The following XAML code works fine if IsIndeterminate is set to False:
<ControlTemplate x:Key="DefaultProgressBarTemplate" TargetType="{x:Type ProgressBar}">
<ControlTemplate.Resources>
<SolidColorBrush x:Key="SolidBorderBrush" Color="#767676" />
<LinearGr...
Hello, I will try and explain this as concise as possible. I have 2 objects, the first which we will call object A that has an Id property and the second we will call object B, which has a ParentId property. The obvious relationship is that object B's ParentId is set to an object A's Id property. I am using the MVVM pattern, so on the vi...
I'm using a style in my XAML for a label:
<Style x:Key="TreatEye" TargetType="Label">
<Setter Property="Foreground" Value="#d1d1d1" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="30" />
<Setter Property="Template">
<Setter.Value>
<ControlTem...