Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. WPF HierarchicalDataTemplate Questions:

WPF HierarchicalDataTemplate Questions:

Scheduled Pinned Locked Moved WPF
csharpdatabasewpf
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kevin Marois
    wrote on last edited by
    #1

    I have 2 questions... I created a HierarchicalDataTemplate which is bound to a NodeModel

    [Serializable]
    public class NodeModel : ViewModelBase
    {
    public Guid Id { get; set; }
    public string Caption { get; set; }
    public string Description { get; set; }
    public bool IsActive { get; set; }
    public ImageSource Image { get; set; }
    public bool IsExpanded { get; set; }
    public string FileName { get; set; }
    public NodeType Type { get; set; }
    public List Children { get; set; }
    }

    the template:

                            <Style.Triggers>         
                                <Trigger Property="IsMouseOver"
                                            Value="False">
                                    <Setter Property="TextDecorations"
                                            Value="{x:Null}" />         
                                </Trigger>       
                            </Style.Triggers>
    
    C 2 Replies Last reply
    0
    • K Kevin Marois

      I have 2 questions... I created a HierarchicalDataTemplate which is bound to a NodeModel

      [Serializable]
      public class NodeModel : ViewModelBase
      {
      public Guid Id { get; set; }
      public string Caption { get; set; }
      public string Description { get; set; }
      public bool IsActive { get; set; }
      public ImageSource Image { get; set; }
      public bool IsExpanded { get; set; }
      public string FileName { get; set; }
      public NodeType Type { get; set; }
      public List Children { get; set; }
      }

      the template:

                              <Style.Triggers>         
                                  <Trigger Property="IsMouseOver"
                                              Value="False">
                                      <Setter Property="TextDecorations"
                                              Value="{x:Null}" />         
                                  </Trigger>       
                              </Style.Triggers>
      
      C Offline
      C Offline
      Cracked Down
      wrote on last edited by
      #2

      This can be achieved by using the style template and DataTriggers (will give you the sample code). Before that, I am not sure why you want to use the Hyperlinks inside the TreeNode. Could you please help me to understand its need. This will help me to give you the answer! Happy Coding :)

      1 Reply Last reply
      0
      • K Kevin Marois

        I have 2 questions... I created a HierarchicalDataTemplate which is bound to a NodeModel

        [Serializable]
        public class NodeModel : ViewModelBase
        {
        public Guid Id { get; set; }
        public string Caption { get; set; }
        public string Description { get; set; }
        public bool IsActive { get; set; }
        public ImageSource Image { get; set; }
        public bool IsExpanded { get; set; }
        public string FileName { get; set; }
        public NodeType Type { get; set; }
        public List Children { get; set; }
        }

        the template:

                                <Style.Triggers>         
                                    <Trigger Property="IsMouseOver"
                                                Value="False">
                                        <Setter Property="TextDecorations"
                                                Value="{x:Null}" />         
                                    </Trigger>       
                                </Style.Triggers>
        
        C Offline
        C Offline
        Cracked Down
        wrote on last edited by
        #3

        You should not disrespect the other people, Or you should not ask the questions if you don not want to get the answer... Happy Coding :)

        K 1 Reply Last reply
        0
        • C Cracked Down

          You should not disrespect the other people, Or you should not ask the questions if you don not want to get the answer... Happy Coding :)

          K Offline
          K Offline
          Kevin Marois
          wrote on last edited by
          #4

          Amardeep Deshmukh wrote:

          You should not disrespect the other people

          What? What the hell are you talking about?

          Amardeep Deshmukh wrote:

          Or you should not ask the questions if you don not want to get the answer...

          Where did this come from???

          If it's not broken, fix it until it is

          C 1 Reply Last reply
          0
          • K Kevin Marois

            Amardeep Deshmukh wrote:

            You should not disrespect the other people

            What? What the hell are you talking about?

            Amardeep Deshmukh wrote:

            Or you should not ask the questions if you don not want to get the answer...

            Where did this come from???

            If it's not broken, fix it until it is

            C Offline
            C Offline
            Cracked Down
            wrote on last edited by
            #5

            Kevin, I was trying to help you out and asked couple of questions to understand the problem statement better. I worked a lot on Hierarchical data and thought could help you. But, instead of replying and clarifying the problem you down voted my reply... Also, I noticed that in one of the question from the C# forum (licensing related question) without understanding the answer provided you directly replied to it saying this will not work. That's why I replied to you post... Sorry if I hurt you sentiments Happy Coding :)

            P 1 Reply Last reply
            0
            • C Cracked Down

              Kevin, I was trying to help you out and asked couple of questions to understand the problem statement better. I worked a lot on Hierarchical data and thought could help you. But, instead of replying and clarifying the problem you down voted my reply... Also, I noticed that in one of the question from the C# forum (licensing related question) without understanding the answer provided you directly replied to it saying this will not work. That's why I replied to you post... Sorry if I hurt you sentiments Happy Coding :)

              P Offline
              P Offline
              Pete OHanlon
              wrote on last edited by
              #6

              Amardeep Deshmukh wrote:

              But, instead of replying and clarifying the problem you down voted my reply

              How do you know it was Kevin? Never assume that you know who downvoted you. Currently only Code Project staff can identify that information. This is one of the reasons that revenge univoting is never a good idea.

              *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

              "Mind bleach! Send me mind bleach!" - Nagy Vilmos

              CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups