Skip to content

utu:AncestorBinding or ItemControlBinding from Data template to parented Grid.ColumnDefinition.Width  #1357

Open
@DevTKSS

Description

@DevTKSS

What would you like to be added:

Sample for how to access the ColumnEidth of the Patented Grid.ColumnDefinitions.ColumnDefinition[0]. ActualContentWidth (or similar just to get the available width (recognizing defined padding!) from there.
My attempt is following one, but struggling on the effective type which could be ColumnDefinition but no selection of which I want? 🤔 maybe the collection? And which property would be the fitting one?

<Page.Resources>
   <DataTemplate [...]>
      <StackPanel Width="{utu:AncestorBinding AncestorType=

Grid, ColumnDefinition or ColumnCollection might be possible...

Why is this needed:

Had multiple applications where this would be nice to have known the solution for this

For which Platform:

  • WebAssembly
  • Android
  • iOS
  • macOS (AppKit)
  • Mac Catalyst
  • Skia
    • WPF
    • GTK (Linux)
    • Linux Framebuffer
    • Tizen
  • Windows

Anything else we need to know?

I would be willing if anyone can help me solve this knowledge void, to add it to the docs for future people searching for it

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/contributor-experienceCategorizes issue or PR as related to improving the experience of contributorskind/documentationCategorizes an issue or PR as relevant to 3rd party dependencies that are consumed by this projecttriage/untriagedIndicates an issue requires triaging or verification.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions