GithubHelp home page GithubHelp logo

spicytaco / spicytaco.autogrid Goto Github PK

View Code? Open in Web Editor NEW
76.0 76.0 13.0 185 KB

A magical replacement for the built in WPF Grid and StackPanel

License: MIT License

C# 96.95% CoffeeScript 3.05%
autogrid c-sharp dotnet margin panel stackpanel wpf wpf-grid wpftoolkit xaml

spicytaco.autogrid's People

Contributors

kmcginnes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

spicytaco.autogrid's Issues

AutoGrid with RowSpan computes wrong layout

I have a layout like

<st:AutoGrid Columns="Auto,*,Auto" Rows="Auto,Auto">
            <TextBlock x:Name="LongText" Grid.RowSpan="99" Width="300" TextWrapping="Wrap" Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sollicitudin, turpis tempor sollicitudin dictum, sapien justo feugiat mi, malesuada volutpat mauris magna quis nulla." />
            <TextBlock Text="Middle text 1"  />
            <Button Content="Right button 1" MinWidth="250" HorizontalAlignment="Right" />
            <TextBlock Text="Middle text 2"  />
            <Button Content="Right button 2" MinWidth="250" HorizontalAlignment="Right" />
</st:AutoGrid>

I would expect the layout:

+-----------------------+---------------+----------------+
| Lorem ipsum dolor     | Middle text 1 | Right button 1 |
| sit amet, consectetur | Middle text 2 | Right button 2 |
| adipiscing elit ...   |               |                |
+-----------------------+---------------+----------------+

Instead, the second row is shifted to the left, so it overlaps the LongText.

Remove PDB path from NuGet dll

SpicyTaco.AutoGrid.dll contins the PDB path z:\Projects\SpicyTaco.AutoGrid\src\AutoGrid\obj\Debug\SpicyTaco.AutoGrid.pdb I have Z: mapped as a network drive, sometimes unreacheable. The Visual Studio always hangs for a few seconds trying to look for the PDB path. Please, remove the path form DLL.

I am a newbiew to C# development, but I think the switch /pdbpath:none may help?

Also AFAIK you can ship PDB with NuGet, upload it to the symbolsource or use GitLink.

RowSpan does not work properly.

When using complex row and column spans in table form,
RowSpan does not work properly.

We have fixed the issue by modifying the following source code:

In PerformLayout ()

cellCount + = (ColumnDefinitions.Count! = 0)? Grid.GetColumnSpan (child): Grid.GetRowSpan (child);
cellCount + = (ColumnDefinitions.Count! = 0)? Grid.GetRowSpan (child) - 1: Grid.GetColumnSpan (child) - 1; // added (add RowSpan to cellCount)

...

Enumerable.Range (1, rowSpan) .ToList () ... // before
Enumerable.Range (1, rowSpan - 1) .ToList () ... // after

...

Enumerable.Range (1, columnSpan) .ToList () ... // before
Enumerable.Range (1, columnSpan - 1) .ToList () ... // after

...

This change works well.

I usually write well. Thank you.

st.AutoGrid MarginBetweenChildren

I like the new st:StackPanel MarginBetweenChildren property. I would like to add it to the st.AutoGrid, too. The st.AutoGrid has ChildMargin property already. It can be overridden, when an element specify it's own 'Margin'. I would like the MarginBetweenChildren behave the same way for the st:StackPanel and st.AutoGrid, too.

.NET Core compatibility

Hi there

I use your AutoGrid in various projects and it is just great!!!

Now I am starting an new project using .Net Core 3.1 and I can reference your AutoGrid and use it as in .Net Framework 4.x project.

The only not really nice thing is, that Visual Studio is showing a warning like that:

x64 designer preview problem

Hi there

I am using you library in my project and it is great how things get easier with it!

But now my problem: Our solution is configured as x64 platform. I noticed that the designer is not working correct and it shows all items in Column 0 and Row 0. I created a small Test app and noticed if I use AnyCpu or x86 everything is as expected.

Is this a known problem and if so, how can I solve it?

Thanks for you help and regards!

Honour the Grid Row and Column settings

If the child has Grid.Row or Grid.Column setting, then it should be placed on proper position. Indexing should start after the specified row/column. Then it would be possible to skip some grid cells instead of placing empty TextBlocks.

Fix Child* overriding existing child values

ChildMargin
ChildHorizontalAlignment
ChildVerticalAlignment

All these properties will overwrite values set explicitly on the child elements.

Explicit settings should be an override for the parents general setting

.Net Core 3.1 compatibility

Hi there

I use your AutoGrid in various projects and it is just great!!!

Now I am starting an new project using .Net Core 3.1 and I can reference your AutoGrid and use it as in .Net Framework 4.x project.

The only not really nice thing is, that Visual Studio is showing a warning like that:
Warning NU1701 Package 'SpicyTaco.AutoGrid 1.2.29' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v3.1'. This package may not be fully compatible with your project.

Could you add .NetCore as target to your solution?

Thx and regards!
Guenter

Rename `MarginBetweenChildren` to `Spacing`

While technically correct, MarginBetweenChildren is a large property name to use. And XAML is already full of long names.

There are other frameworks that already express the same concept, and they call it Spacing. I'd like to adopt that here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.