Giter Site home page Giter Site logo

ToolboxItem Icon about gemini HOT 4 CLOSED

tgjones avatar tgjones commented on July 26, 2024
ToolboxItem Icon

from gemini.

Comments (4)

cameronws avatar cameronws commented on July 26, 2024

Managed to get this working - used local copy of source code. Made updates to the following files: ToolboxView.xaml, ToolboxItem.cs, ToolboxItemAttribute.cs and ToolboxService.cs. By default the Sigma icon will be used unless specified in the ToolboxItem Attribute on the ToolboxItem.

from gemini.

tgjones avatar tgjones commented on July 26, 2024

You're right; I do need to hook up the ToolBoxItemViewModel.IconSource attribute. Thanks for bringing it my attention.

from gemini.

cameronws avatar cameronws commented on July 26, 2024

I noticed the update. Almost exactly what I had initially thought, although I had the sigma.png image as the default icon if none was specified. I seem to be having issues with the latest copy of the code as the toolbox is no longer visible for the FilterDesigner demo. After changing the IconSource type from Uri to string, and removing the string-to-uri conversion in the toolbox service class, the toolbox came back into view with all icons displayed correctly. Perhaps I'm doing something wrong or missing something with the original code?

from gemini.

cameronws avatar cameronws commented on July 26, 2024

Figured out a correct and much simpler fix. In the Gemini.Modules.Toolbox.Services.ToolboxService class, change the IconSource to the following:
IconSource = (attribute.IconSource != null) ? new Uri(attribute.IconSource, UriKind.RelativeOrAbsolute) : null
After specifying UriKind, the demo works as expected with no other code changes (no need for my previous suggested changes).

from gemini.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.