I've been considering how you would write a business application in only F# with WPF. Here's my thinking of a general outline of how to go about it, but I'm looking for whether or not it will work:
Start with ADO.NET Entities to automatically generate a data access layer.
Since F# doesn't support partial classes, use F# Extension Meth...
I want to bind a treeview to a class like this one:
public class Folder : Base_FileFolder
{
public Folder()
{
Folders = new ObservableCollection<Folder>();
Files = new ObservableCollection<File>();
}
public ObservableCollection<Folder> Folders { get; set; }
public ObservableCollection<File> Files { ge...
I am currently developing a WPF application that will utilize existing WinForm dialogs. I'm experiencing a long lag between the time I call ShowDialog() on a WinForm to the time it is displayed.
Even when reusing WinForm dialog objects the lag time is nearly as bad on the second hit. Meaning that the problem isn’t in the constructor.
D...
I'm getting an "Object reference not set to an instance of an object" error when I try to reload the Designer for my XAML UserControl. Visual Studio highlights the following line as being the problem:
<local:TemplateDetail Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="3"
Width="600" TemplateData="{Binding ElementName=cbo_templates,...
How can I do something like this?
<Style TargetType="Grid">
<Setter Property="Children">
<Setter.Value>
...
</Setter.Value>
</Setter>
</Style>
I know Children in read-only and this gives me "Writable property expected" on Children.
Thanks
...
Hi all,
I'm developing the ImageViewer by using WPF as follow:
I have a TIFF (multiple pages) binary in database and decoded by TiffBitmapDecoder with Cache option = Default. After decoding I get a list of Frames (pages)
Each frame (represent one page of the Tiff file) is used to construct an ImageBrush to set to background of a canva...
I have a ListView with a CheckBox as one of the columns, bound to a boolean property of a custom object. I'm trying to figure out how to iterate through the items in the ListView and check all the checkboxes. What I have so far is below:
XAML:
<ListView x:Name="MyListView" DockPanel.Dock="Top" Height="275" IsSynchronizedWithCurrentIt...
I have an ItemsControl with a DataTemplate that is bound to an ObservableCollection of integers.
<ItemsControl Name="DimsContainer" ItemTemplate="{StaticResource DimensionsTemplate}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsCont...
Using the below code in a DataGridTemplateColumn of the DataGrid, my formatting buttons are disabled(grayed out). The formatting buttons are only enabled when they are put in a ToolBar.
When the buttons are put in a ToolBar I do not need the CommandTarget. So when I put them outside a ToolBar some could think it must work with CommandTa...
While I don't have a specific code example in mind when writing this, I do wonder if anyone in the community has worked with rich media in relationship to WPF FlowDocuments. Specifically, I would like to be able to reference a video within a FlowDocument, and that video may or may not be short enough to justify directly downloading as a...
I have an ItemsControl with a DataTemplate that is bound to an ObservableCollection of integers.
<ItemsControl Name="DimsContainer" ItemTemplate="{StaticResource DimensionsTemplate}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsCont...
Hi
I would like to create a listbox, with a details pop-up/tooltip kind of window.
Scenario is as following:
List of items
Show details of selected item
Details should be displayed outside the listbox and overlaying any controls that happens to be nearby.
The problem about using tooltips is that they disappear after a while. And the ...
Hi.
I'm building a program in WPF which must feature multi-language support, with the ability to switch language at run-time. My question concerns the image part of the localization.
I've built a solution which does not work the way I had hoped it would work and I would like some help fixing these problems. The code posted below is onl...
Hi,
I have a list box containing many items and I have a combobox in C# WPF.
I would like to bind the itemsource of the combobox to that of the listbox but I want to filter out some of the items (it's an xml datasource, I want to filter by the contents of a certain element of the item element).
Example item:
<Item>
<itemtype>A</it...
private void Window_Loaded(object sender, RoutedEventArgs e)
{
var assm = Assembly.LoadFrom("wpflib.dll");
foreach (var t in assm.GetTypes())
{
var i = t.GetInterface("test.ILib");
if (i != null)
{
var tmp = Activator.CreateInstance(typeof(UserControl)) as UserControl;
this.stac...
i did some finding and found theres a project markdown sharp which is used by stack overflow?
Open source C# implementation of
Markdown processor, as featured on
Stack Overflow.
so anyway, i downloaded it. but how do i use it? if possible any code samples or tutorials? theres none to get me started in that google code site.
...
If I have a Style inside Generic.xaml and I want to reference a style within the SAME Generic.xaml file why does it not work?
<Style TargetType="{x:Type w:SomeControlIWantToStyle}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type w:SomeControlIWantToStyle}">
...
I' building an hobby project in WPF also decided to use Metro style theme to application. Is it possible to use Windows phone 7 styles in desktop application instead of recreating?
...
i know HTML/CSS and want to learn WPF styling. how can i get started. i see that padding, for example, works differently in WPF app.
in css:
padding: 5px 10px;
in XAML?
Padding="5px"
i notice that i need to expand the width of the element eg. button myself to accomodate the padding? if so, how can i calculate the box model? the...
Hi, I have been trying for a day now, to no avail, to create a bunch of brushes in the theme then using them with DynamicResource in a custom control. What I did is this:
create the theme generic.xaml which contains styles (works)
add a dictionary to merge in generic.xaml to contain brushes used in the application (works)
make brushes ...