View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000790 | NoesisGUI | Unity | public | 2016-01-02 19:06 | 2018-11-23 01:31 |
| Reporter | Scherub | Assigned To | sfernandez | ||
| Priority | normal | Severity | minor | ||
| Status | assigned | Resolution | open | ||
| Summary | 0000790: Binding to RowDefinition Height doesn't work | ||||
| Description | I am trying to place an element vertically relative to a calculated item value. Just think of a horizontal level list where each item is vertically placed in a different position. I have it working in WPF but unfortunately it doesn't work in NoesisGUI. The problem seems to be the binding of the RowGridDefinition to the GridLength property of the item. Apparently it's ignored completely. I've also tried giving the (for the calculation) required height (so I could actually rid of the percentage) to the bound item but the property's setter is never called. I'll now try a MultiValueConverter even if I don't know whether they're already supported by NoesisGUI. Following the DataTemplate I've used: [code]
[/code] | ||||
| Attached Files | |||||
| Platform | Any | ||||
|
Hi, Binding RowDefinition.Height works on simple scenarios, I just confirmed it. Maybe it is a problem on the layout when trying to calculate the element sizes and calculations are dependant between elements. Could you please provide an image of what you want to accomplish? Maybe I can find an alternative while we solve the problem. Thanks. |
|
|
Okay, I've uploaded an old mockup image. |
|
|
Have you tried to use a TranslateTransform to move the item inside an available space?
|
|
|
The problem here is that OffsetY requires a fixed value. I was trying to avoid having fixed values wherever possible and use percentages instead. |
|
|
Well, OffsetY can be anything you want. This value can be something relative to screen size, item size, whatever you can imagine. |
|
|
Yes, you're right but for that I have to calculate the value and for that I need the available space and the percentage/alpha where it should appear. As I said in the opening 'post' I also tried to submit the for the calculation required space to the bound level class over a property setter but that doesn't work either. But maybe I just don't understand what you're trying to do/tell me. |
|
|
For example, to get from the View the screen size you can have an attached property, set in a top element covering the screen, that subscribes to its SizeChanged event. Knowing that value, the OffsetY property can be calculated like this:
GetOffset provides a relative offset depending on the position of the Level in the Levels array. Does this make any sense in your scenario? :) |
|
|
Well, that's not really the solution I was looking for but I guess it has to do for now. The thing is that I already have the PC version in mind and I will use for various views different platform-dependend XAMLs but the same ViewModel and data (container) classes. So it would be much better to do these kind of things within the XAML. But as I said, I'll do all the calculations in the data container class for now. Thanks again! :) |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2016-01-02 19:06 | Scherub | New Issue | |
| 2016-01-07 11:29 | sfernandez | Note Added: 0003430 | |
| 2016-01-07 11:29 | sfernandez | Assigned To | => sfernandez |
| 2016-01-07 11:29 | sfernandez | Status | new => feedback |
| 2016-01-07 13:38 | Scherub | File Added: Levels_Select.jpg | |
| 2016-01-07 13:39 | Scherub | Note Added: 0003437 | |
| 2016-01-07 13:39 | Scherub | Status | feedback => assigned |
| 2016-01-12 06:53 | sfernandez | Note Added: 0003442 | |
| 2016-01-12 06:53 | sfernandez | Status | assigned => feedback |
| 2016-01-12 07:22 | Scherub | Note Added: 0003443 | |
| 2016-01-12 07:22 | Scherub | Status | feedback => assigned |
| 2016-01-12 07:49 | sfernandez | Note Added: 0003444 | |
| 2016-01-12 07:49 | sfernandez | Status | assigned => feedback |
| 2016-01-12 08:38 | Scherub | Note Added: 0003446 | |
| 2016-01-12 08:38 | Scherub | Status | feedback => assigned |
| 2016-01-12 09:40 | sfernandez | Note Added: 0003447 | |
| 2016-01-12 09:40 | sfernandez | Status | assigned => feedback |
| 2016-01-12 11:42 | Scherub | Note Added: 0003448 | |
| 2016-01-12 11:42 | Scherub | Status | feedback => assigned |
| 2018-11-01 02:14 | jsantos | View Status | public => private |
| 2018-11-23 01:31 | sfernandez | View Status | private => public |
| 2018-11-23 01:31 | sfernandez | Platform | => Any |
| 2025-10-10 13:29 | jsantos | Category | Unity3D => Unity |