xaml

What .Net/WPF features do you miss when working in Silverlight?

I recently started working with Silverlight and immediately noticed the difference between the Silverlight BCL and the full .Net and WPF. For some of them I've found great solutions posted online by other developers, and others were more complicated. What features/classes were you surprised/disappointed to find absent from the Silverli...

How to achieve Vista glass transparency (AERO) in a WPF application?

It's easy for a WPF application to make parts of a window transparent or semi-transparent. But how to I apply the current Vista theme (colors, opacity) to these transparent parts? When I have a green glass border how will I get a green glass background of the same style? Is it even possible to do this without calls to the Windows API? ...

What is .baml file?

Hi All, What is .baml file and what's the use of this file? Who creates this file? ...

WPF/XAML: Typography.Capitals seems to have no effect

All of these bits of text look the same, but I am trying to get them to look different. I want small caps text. What am I missing here to get the small caps typography effect to work? To reproduce this, open Visual Studio 2008, Do File|New Project, create a new Windows|WPF application, paste the mark-up below into Window1.xaml, then run...

Animate WPF Datatemplate when item added to Listbox?

Hello, In my project I have a WPF Listbox bound to an ObservableCollection. Every time I add a new item to the Collection the same item is added to the Listbox automaticly. To display the items in the Listbox I use a XAML Datatemplate. What I want to do is animate an item once when it is added to the Collection/Listbox. Can this be don...

Using ObjectDataProvider

I cannot believe that nobody has gotten across this or perhaps I'm just missing something. I've got a custom DataSourceController which handles retrieving data and providing it to the rest of the application controls. Naturally, it uses sql connection which I also initialize. My App code: private ISQLConnection conn; public ISQLConnec...

Import RTF with images in xbap

I need to import a RTF document into a FlowDocument for further parsing.. But I have a very strange problem: public string ConvertRTF(byte[] bytes) { if (bytes == null) { throw new ArgumentNullException(); } FlowDocument document = new FlowDocument(); // open the file for reading using (MemoryStream str...

Using static objects in XAML that were created in code in Silverlight

I couldn't get this to work in Silverlight, so I created two test projects. One simple WPF project and one simple Silverlight project that both do only one thing: set a public static readonly variable in code, and use it in a completely bare bones XAML. In WPF, works without a hitch. In Silverlight, I get the following compiler warni...

How do I embed the ItemTemplate for a wpf ListBox into the Window's resources?

Hello all, Sorry if this is a basic question, but how can I take an ItemTemplate that I have for a ListBox, and put it in the resources for the window so that more than one ListBox can use it. Here's some XAML: <Window x:Class="Example"> <Window.Resources> <DataTemplate x:Key="dtExample"> <ListBox.ItemTemplate>...

DataBinding in a List View

Hello All, Am new to XAML/WPF and have come across this weird issue: I have a list view to which I set a DataSource. The DataSource is an arraylist of "CatalogPartRows". I create my columns in the code. I then set their cell templates (some of my columns contain combo boxes and check boxes). My problem here is that I need to call a fu...

How do I go about debugging source code on Windows 7?

I have this project that recently started crashing on beta builds of Windows 7. Something about the XAML parser going belly up. If its easy I would not mind putting a work around in place to compensate for the new .Net behaviour in Windows 7. How would I go about debugging this on Windows 7? Step 1: Install Windows 7 in a VM. Ste...

Making a XAML file internal in .Net

In my Silverlight project, I would like to make an assembly which contains .xaml that can't be seen from outside of the assembly. However, there is no clear way I can do this. When I modify the access modifier on the .xaml.cs file, the compiler tells me: Partial declarations of "My xaml class here" have conflicting accessibility modifie...

How to solve XAML designer error: The document contains errors that must be fixed before the designer can be loaded

I have a XAML file that references custom controls defined into another assembly. It compiles and works perfectly at runtime, but the XAML designer is choking and does not show the design content. <Window x:Class="MyProgram.AboutWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.mi...

How can i disable Cider (WPF Gui Editor) within VS2008 ?

hi there, when developing wpf applications i never use the graphical editor ( aka cider). only the xaml editor. as "cider" needs quite some resources when loaded i wonder if there is a way to completely disable it. This may speed up loading xaml files. i heard that this is possible, but as google does not return what i`m looking for, i...

Using WPFToolKit's DataGridHyperlinkColumn

I'm using WPFToolkit's Datagrid control. I can populate the datagrid, but I'm having trouble with the DataGridHyperlinkColumn. I would like it to visually display the link as the Person's name, but for the link to go to whatever UriLink's value is. How can I do this? What am I doing wrong? Xaml: <dg:DataGridHyperlinkColumn Header...

Silverlight 2: Want a variable number of items to take up a fixed width.

The stackpanel is not co-operating. We have a fixed width, and a variable number of items to lay out left-to-right inside it. We have a an items control that lays them out with a stack panel: <ItemsControl x:Name="testItems" HorizontalAlignment="Left" VerticalAlignment="Top"> <ItemsControl.ItemsPanel> ...

dynamic datatemplate with valueconverter

I want to show data in a wpftoolkit datagrid where the data is a collection of public class Thing { public string Foo { get; set; } public string Bar { get; set; } public List<Candidate> Candidates { get; set; } } public class Candidate { public string Name { get; set; } public CandidateType CandidateType { get; se...

Silverlight Video Stretching

What I want: To be able to resize the actual video inside the SL player with JS as I drag the corner. What I have so far: http://resopollution.com/granicus/silverlight_test/test_silverlight.html (try dragging the corner, it crops the video, not resizing the video). I'm using jquery to dynamically resize the outer div and the OBJECT tag ...

Is it possible to compile Silverlight controls project with Nant?

Hi all, I am attempting to compile my Silverlight control project with Nant without luck. Since my project contains XAML files, I am not sure if Nant is capable of generating the .g.cs files from the XAML file to be compiled into the project. I have come across posts where people suggest using the MsBuild task. Is there a way to avoid u...

How to get sole DockPanel child element to dock on the top

Below I say "DockPanel.Top" on Menu but it docks in the middle. (?) If I take the Height attribute out of Menu it docks on top but is about 200px high. (?) I thought that was what LastChildFill was for. How can I get this child element of DockPanel to dock on the top with no other items in the dockpanel? <Window x:Class="TestContain...