c# - Floating controls in dynamic width container in XAML -


i new xaml , trying @ runtime add dynamic number of buttons container scales current window width , height. buttons should centered , placed beside each other , if there not enough space on 1 line, button wide moved above other buttons , on, resulting in "floating" behavior known html.

if there enough buttons scale containers height larger window should possible scroll in container, part dont think problem "float" behavior cannot figure out how do. have tried available panels none seem suit purpose , thinking creating custom control positions child controls in way want, there must way can achived using standard controls?

i developing in uwp universal app both desktop , mobile.

thanks input problem :)

maybe achieve want combination of relativepanel , couple of visualstates , visual state triggers such adaptivetrigger or windowsstatetriggers library. these define different visual states, each representing different layout of buttons , define triggers apply these states based on conditions (most based on size of container). there's example of approach described in this blog post.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -