Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display attribute & Reset link doesn't work in FeaturesDialog window #111

Closed
lord2kim opened this issue Jul 31, 2017 · 4 comments
Closed

Comments

@lord2kim
Copy link

Hi, Oleg.
In first thank you very much for this framework. Very simple way for create installer every case for new build.

Question is follow.

When I use WixUI_FeatureTree for UI additional attribute Display working ok. The follow C# code create expanded default tree on appropriate window.

var app = new Feature("Application") { Name = "Application",
                                       Description = "Application",
                                       Attributes = new Dictionary<String, String>() {
						{ "Display", "expand" } 
				       }
				     };
var driver = new Feature("Driver") { Name = "Driver",
                                     Description = "Driver" };
app.Add(driver);

...

project.UI = WUI.WixUI_FeatureTree;

As we can see by screen below, default feature tree is expand:
Image

But if I will use WixSharp.UI.Forms.FeaturesDialog window this attribute doesn't work and in any case custom tree doesn't expanded on UI by default.

var app = new Feature("Application") { Name = "Application",
                                       Description = "Application",
                                       Attributes = new Dictionary<String, String>() {
						{ "Display", "expand" } 
				       }
				     };
var driver = new Feature("Driver") { Name = "Driver",
                                     Description = "Driver" };
app.Add(driver);

...

project.ManagedUI = new ManagedUI();
project.ManagedUI.InstallDialogs.Add<WelcomeDialog>()
                                .Add<LicenceDialog>()
                                .Add<InstallDirDialog>()
                                .Add<FeaturesDialog>()
                                .Add<ProgressDialog>()
                                .Add<ExitDialog>();

As we can see by screen below, custom feature tree is not expand (collapse):
Image

This "feature" doesn't work in custom FeaturesDialog window ? Or has another way for using it ?
If this is doesn't work does it possible for fix it ? :)

Also looks like "Reset" link in this FeaturesDialog doesn't work too.

@oleg-shilo
Copy link
Owner

Thank you for reporting the issue.
Currently 'display' attribute is not processed in the FeaturesDialog. I have extended the solution to handle it an in the future releases the feature tree will reflect the 'Display' attribute value.

A dedicated Feature.Display member has been added to assist with the syntax:

var docs = new Feature("Documentation", "Product documentation (manuals and user guides)", true) 
{ 
    Display = FeatureDisplay.expand 
};

As for "Reset", I am not sure the I have enough information. It seems to work, at least for the sample from the distro:
wix _support


And on completely unrelated topic... Just sharing some tips...

You can add attributeds to the WixEntity in a more elegant way:

var app = new Feature("Application") 
{ 
    Name = "Application",
    Description = "Application",
    AttributesDefinition = "Display=expand; AnotherAttribute=777" 
};

You don't need to host your images somewhere else. You can just add them to GitHub wiki by doping the image file directly in the post's text or even pasting it from the clipboard.

oleg-shilo added a commit that referenced this issue Aug 2, 2017
----
* Issue #111: Display attribute & Reset link doesn't work in FeaturesDialog window
* Issue #107: ManagedBootstrapperApplication Payloads
* issue #108: [ManagedUI] feature checkbox can be unchecked when allowChange is false
* Issue #109: [ManagedUI] backgroup image dimensions
* Issue #103: Compiler.WixLocation, WixSharp.wix.bin and new csproj format in Visual Studio 2017
* Issue #99: Working with embedded WPF UI and MSI; Updated code sample.
* Issue #102: Update nuget package WixSharp.bin to include WIX (Windows Installer Xml) Toolset v3.11
* Migration of WiX Toolset from v3.10.3 (v3.10.3007.0) to v3.11.0 (v3.11.1701.0)
@oleg-shilo
Copy link
Owner

The latest NuGet package contains the fix.

@lord2kim
Copy link
Author

lord2kim commented Aug 2, 2017

Hi, Oleg.

Thank you very much. Looks like it's working with latest update of WIx#.

Thank you for tips...yes, this is better & elegant.

About "Reset" link...hm, strange, in previous Wix# ver this is doesn't work, but with latest update is is work correctly.

About images...it didn't work for me for first time.

@oleg-shilo
Copy link
Owner

OK then. I'll be closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants