fluentribbon / Fluent.Ribbon

WPF Ribbon control like in Office
http://fluentribbon.github.io
MIT License
2.55k stars 516 forks source link

Menu item binding issue #601

Closed ShadyNawara closed 6 years ago

ShadyNawara commented 6 years ago

when attempting to use binding the following way. it doesnt seem that the checked status is updated, nor does the variable update when i click on the menu item

`

` --- ### Environment - Fluent.Ribbon 6.1.0 - Windows 10 - .NET Framework 4.7.1
batzen commented 6 years ago

Could you try to reproduce this using the alpha of version 7.0? Can't reproduce your issue using that version.

ShadyNawara commented 6 years ago

i pulled the source code from the master branch and used that one but still i cant get it to work. i have bindings attached to the togglebutton and that one works just fine using the same method.

This is the code i am using for the binding private bool _menuChecked { get; set; } public bool menuChecked { get { return _menuChecked; } set { _menuChecked = value; NotifyPropertyChanged(); } }

batzen commented 6 years ago

The master branch only contains the current stable version which is 6.1. To get version 7.0 you can either clone the develop branch or use the current preview of 7.0 from nuget.

batzen commented 6 years ago

If that still doesn't work it would be nice if you could attach a small repro to this issue.

ShadyNawara commented 6 years ago

i tried building the develop branch but it says "The target "GetAssemblyAttributes" does not exist in the project."

batzen commented 6 years ago

Have you read the development requirements? You need the latest version of VS2017 to compile.

ShadyNawara commented 6 years ago

i do have that ver. 15.7.6

batzen commented 6 years ago

That's strange. Could you try to run the powershell script "Build.ps1" and see if that works?

ShadyNawara commented 6 years ago

I get the same error `

Build

Microsoft (R) Build Engine version 15.7.180.61344 for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

C:\Users\Shady.nuget\packages\gitlink\3.1.0\build\GitLink.targets(9,5): warning : Unable to find file in git: "c:\user s\shady\onedrive\desktop\fluent\fluent.ribbon\fluent.ribbon\obj\release\net462\generatedinternaltypehelper.g.cs". [C:\U sers\Shady\OneDrive\Desktop\fluent\Fluent.Ribbon\Fluent.Ribbon\Fluent.Ribbon.csproj] Fluent.Ribbon -> C:\Users\Shady\OneDrive\Desktop\fluent\Fluent.Ribbon\bin\Fluent.Ribbon\Release\net462\Fluent.dll C:\Users\Shady.nuget\packages\msbuild.sdk.extras\1.6.46\Build\ReferenceAssembly.targets(71,61): error MSB4057: The tar get "GetAssemblyAttributes" does not exist in the project. [C:\Users\Shady\OneDrive\Desktop\fluent\Fluent.Ribbon\Fluent .Ribbon\Fluent.Ribbon.csproj] C:\Users\Shady.nuget\packages\msbuild.sdk.extras\1.6.46\Build\ReferenceAssembly.targets(71,61): error MSB4057: The tar get "GetAssemblyAttributes" does not exist in the project. [C:\Users\Shady\OneDrive\Desktop\fluent\Fluent.Ribbon\Fluent .Ribbon\Fluent.Ribbon.csproj] C:\Users\Shady.nuget\packages\gitlink\3.1.0\build\GitLink.targets(9,5): warning : Unable to find file in git: "c:\user s\shady\onedrive\desktop\fluent\fluent.ribbon\fluent.ribbon\obj\release\net45\generatedinternaltypehelper.g.cs". [C:\Us ers\Shady\OneDrive\Desktop\fluent\Fluent.Ribbon\Fluent.Ribbon\Fluent.Ribbon.csproj] Fluent.Ribbon -> C:\Users\Shady\OneDrive\Desktop\fluent\Fluent.Ribbon\bin\Fluent.Ribbon\Release\net45\Fluent.dll C:\Users\Shady.nuget\packages\msbuild.sdk.extras\1.6.46\Build\ReferenceAssembly.targets(71,61): error MSB4057: The tar get "GetAssemblyAttributes" does not exist in the project. [C:\Users\Shady\OneDrive\Desktop\fluent\Fluent.Ribbon\Fluent .Ribbon\Fluent.Ribbon.csproj] C:\Users\Shady.nuget\packages\msbuild.sdk.extras\1.6.46\Build\ReferenceAssembly.targets(71,61): error MSB4057: The tar get "GetAssemblyAttributes" does not exist in the project. [C:\Users\Shady\OneDrive\Desktop\fluent\Fluent.Ribbon\Fluent .Ribbon\Fluent.Ribbon.csproj] An error occurred when executing task 'Build'. Error: One or more errors occurred. MSBuild: Process returned an error (exit code 1). `

batzen commented 6 years ago

I guess you'll have to use the nuget version for now. Will still try to figure out why you get that error.

batzen commented 6 years ago

Do you have the .net core sdk installed as part of visual studio?

ShadyNawara commented 6 years ago

Yes I do. Could there be a conflict

batzen commented 6 years ago

The target that it says is missing is from the dotnet sdk (https://github.com/dotnet/sdk) which is the base for the sdk-based csproj format which Fluent.Ribbon uses. Which sdk version do you have installed?

ShadyNawara commented 6 years ago

so, apparently i was trying the build on a different machine that didnt have .net core sdk installed. after installing it, the develop branch now builds just fine. Thank you for that. However, My original issue was still not fixed by the update. i will try to upload a simplified repo in a bit

batzen commented 6 years ago

@shandoosheri ping