Blend Importing .AI File
For Blend to import .ai (illustrator) files they must be saved as PDF compatibility files:
WPF Interop in WinForms – ElementHost control
Making WinForms project host WPF (VS 2010)
•Add
WindowsFormsIntegration.dll to
Project Reference folder.
•WindowsFormsIntegration.dll is
installed with the WPF assemblies. The default location for the assembly is
%programfiles%\Reference
Assemblies\Microsoft\Framework\v3.0\WindowsFormsIntegration.dll
•New
control System.Widows.Forms.Integration.ElementHost
appears
in the Toolbox
•Drop
ElementHost
control onto the Winforms host
form.
WPF String ResourcesLet's say we have a WPF Library DLL called "StartPagePage". Normally we want to store .NET project strings in a \Properties\Resources.resx file. - Look in the VS Solution Explorer. If there is no Resources.resx file under the Properties folder then create one (using the Resource Tab in the Properties page).
- In the header of each .xaml file add a reference to the resource file
- xmlns:p="clr-namespace:MPStartupPage.Properties"
- Double click Resources.resx and add ID/Strings pairs as MyString1/Some Text.
- Now replace the actual XAML text with this
Text="{x:Static p:Resources.MyString1}" T - etc.
Example:<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:local="clr-namespace:MPStartupPage" x:Name="UserControl" xmlns:p="clr-namespace:MPStartupPage.Properties" Width="1000" Height="668"> <TextBlock x:Name="HeaderText1" Margin="26,21,0,0" Text="{x:Static p:Resources.StartPage_HeaderText1}" >
|