मैं WPF खिड़की पर काम कर रहा हूँ कि रैपिंग के साथ एक दूसरे अगले मदों की सूची दिखाने के लिए, मैं इस तरह से WrapPanel
उपयोग करने के लिए प्रयास किया है:फिक्स्ड लपेटें पैनल WPF
<Grid>
<ItemsControl>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.Items>
<Button Content="01" Height="30" Width="70"/>
<Button Content="02" Height="35" Width="72"/>
<Button Content="03" Height="20" Width="74"/>
<Button Content="04" Height="25" Width="76"/>
<Button Content="05" Height="18" Width="78"/>
<Button Content="06" Height="50" Width="70"/>
<Button Content="07" Height="40" Width="72"/>
<Button Content="08" Height="55" Width="74"/>
<Button Content="09" Height="45" Width="76"/>
<Button Content="10" Height="25" Width="78"/>
<Button Content="11" Height="20" Width="80"/>
<Button Content="12" Height="30" Width="70"/>
<Button Content="13" Height="45" Width="72"/>
<Button Content="14" Height="30" Width="74"/>
<Button Content="15" Height="20" Width="76"/>
<Button Content="16" Height="25" Width="78"/>
<Button Content="17" Height="35" Width="80"/>
<Button Content="18" Height="50" Width="70"/>
<Button Content="19" Height="55" Width="72"/>
<Button Content="20" Height="45" Width="74"/>
<Button Content="21" Height="20" Width="76"/>
<Button Content="22" Height="60" Width="78"/>
<Button Content="23" Height="20" Width="80"/>
<Button Content="24" Height="25" Width="70"/>
<Button Content="25" Height="30" Width="72"/>
</ItemsControl.Items>
</ItemsControl>
</Grid>
और इस परिणाम है:
वास्तव में इस परिणाम क्योंकि अगर आप ग्रिड (पंक्तियों और स्तंभों) के रूप में WrapPanel
कल्पना आप कोई स्तंभ है कि वहाँ मिल जाएगा, लेकिन वहाँ तय आकार पंक्तियों हैं मेरे लिए असंतोषजनक है। मैं भी WarpPanel
या स्तंभों के बिना किसी और कुछ नियंत्रण बनाने के लिए, इस काल्पनिक छवि को देखने की जरूरत है: यदि कोई भी पंक्ति और स्तंभ है
सूचना है कि वहाँ। यह वही है जो मैं बनाना चाहता हूं।
किसी के पास इस मुद्दे को हल करने के लिए विचार हैं?
के अनुसार मैं किसी भी छवि .. – Bathineni
तरह क्लेमेंस पहले से ही देखने के लिए सक्षम नहीं कर रहा हूँ लिखा है, आपको अपने स्वयं के पैनल को किसी प्रकार के बिन पैकिंग के साथ लिखना होगा। [यह] (http://www.codeproject.com/Articles/210979/Fast-optimizing-rectangle-packing-algorithm-for-bu) शुरू करने के लिए एक अच्छा लेख हो सकता है। – dowhilefor