Sunday, February 15, 2015

1. Question and Answer

1. Question: Why did I get the following build error when I tried to build my solution?
"Unknown build error, 'Cannot resolve dependency to assembly 'Microsoft.Windows.Design.Extensibility, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.' "

    Answer: When your development environment is Visual Studio 2012, if you use any third party library, like LinsUIWPF Suite, which contains editable controls during design time. Then you need to add "Microsoft.Windows.Design.Extensibility" version 4 into your reference list.

2. Question: After I download and unzip the file, I can not open the help file.

    Answer: The solution is as follows,
a.    After the download, unzip the file.
b.    Right click at *.chm file and select "Properties" on the popup menu.
c.    On the "General" tab, click the "Unblock" button.
d.    Then click "Ok".

3. QuestionHow to switch between Metro style and Normal Windows style?

    Answer: Since all applications which used LinsUIWPF Suite automatically contains both Metro Style and Normal(Traditional) Windows Style, so the user should be able to switch between Metro Style and Normal Windows Style. Please reference the page, How to switch between Metro style and Normal Windows style.

4. Question: What is the purpose of LinsUIWPF Suite?

    Answer: The purpose of LinsUIWPF Suite is to release the developers from UI development so they can focus on their specialty. LinsUIWPF Suite supports both multiple document interface (MDI) and tabbed document interface (TDI), and it supports both metro style and traditional windows style. When developers use LinsUIWPF Suite with their application, they do not need to worry about if their customers will prefer MDI to TDI, or prefer metro style to traditional windows style. Customers are able to select any style at run time. 
Please reference the following pages, 
1. How to switch between Metro style and Normal Windows style.
2. Making WPF application contain both metro-style and tradition windows style with LinsUIWPF Suite.

5. Question: How to change my application's logo?

    Answer: There are two ways to do that.
First way, assign the icon from code-behind like the following,
public partial class Window1 : LinsMDIWindow
            public Window1()

                  Uri iconUri = new Uri(
                 "pack://application:,,,/LinsUIWPF;component/Resource/MyApp.ico",                   UriKind.Absolute);
                  this.Icon = BitmapFrame.Create(iconUri);

Second way,  you can assign it from XAML directly. 
Step 1: Double click at Window1.xaml.
Step 2: View -> Properties Window.
Step 3: Go to Icon field, and select your application icon from the drop-down list.

6. Question: If a command is located inside an assembly which is no necessary available, how to turn on/off a tool item, which is associated to the command, based on the availability of the assembly?

    AnswerPlease reference the following pages, 
1.   How to dynamically turn on/off a tool item based on the availability of an assembly
2.   LinsUIWPFUtil
3.   How to create a new project with LinsUIWPF Suite

No comments:

Post a Comment