NMitchell24 / CraftingCalculator

Simple Crafting Calculator for Survival Crafting Games
GNU General Public License v2.0
3 stars 1 forks source link

ListBox extends height to fit all items unless height is specifically set #23

Closed NMitchell24 closed 3 years ago

NMitchell24 commented 4 years ago

Describe the bug Prevents the Height of the window from being dynamic. the height and width of the listbox control automatically adjusts based upon the items in the list.

To Reproduce

  1. Steps to reproduce the behavior:
  2. Edit RecipesView.xaml
  3. Edit the Grid at line 35 and remove the 'Height' attribute.
  4. Note that the Recipes List on Recipe Calculator extends to all items.
  5. Change filter recipes by to Access Card
  6. Note that all controls on the page now shrink down to the height of the Recipes list at only 3 items.

Expected behavior Height and Width of controls should dynamically adjust to the height/width of the window so that it has a fluid layout.

Once fixed then the fix also needs to be applied to the new ConfigureRecipes.xaml view.

Affected Versions 1.1.0.0 (master), 2.0.0.0 (RecipeManager_1)

NMitchell24 commented 3 years ago

Created a custom converter to make sure that the content area always resizes to 97% of the actual window size. Resolves this issue and ensures that resizing the window also controls the listbox.