home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
Skins and Design
BlueVision
Blue Vision
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="morpheus_xx" data-source="post: 1137468" data-attributes="member: 48495"><p>[USER=145639]@ge2301[/USER] I wanted to refactor the shadow definitions and moved out the code into a resource. I checked the different combination, so that I don't accidently remove your values again <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" /></p><p></p><p>One question though: is it intended that there are following combinations of Margin and Row/Column Height/Widths:</p><ul> <li data-xf-list-type="ul">-3 / 18 (1x in MediaStyles.xaml)<br /> </li> <li data-xf-list-type="ul">-3 / 19 (2x in MediaStyles.xaml)<br /> </li> <li data-xf-list-type="ul">-3.5 / 22 (1x in MediaStyles.xaml + 1x MediaItemFanart.inc)<br /> </li> <li data-xf-list-type="ul">-3.5 / 24 (2x in MediaStyles.xaml)</li> <li data-xf-list-type="ul">-4 / 24 (1x in OtherControls.xaml)</li> </ul><p>The styles looks like:</p><p>[CODE=XML] <Style x:Key="Shadow_3_18"></p><p> <Setter Property="Template"></p><p> <Setter.Value></p><p> <ControlTemplate></p><p> <Grid Margin="-3"></p><p> <Grid.ColumnDefinitions></p><p> <ColumnDefinition Width="18" /></p><p> <ColumnDefinition Width="*"/></p><p> <ColumnDefinition Width="18" /></p><p> </Grid.ColumnDefinitions></p><p> <Grid.RowDefinitions></p><p> <RowDefinition Height="18" /></p><p> <RowDefinition Height="*" /></p><p> <RowDefinition Height="18" /></p><p> </Grid.RowDefinitions></p><p> <Image Grid.Row="0" Grid.Column="0" Stretch="Fill" Margin="0" Opacity="0.9" Source="shadow_00.png" /></p><p> <Image Grid.Row="1" Grid.Column="0" Stretch="Fill" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0" Opacity="0.9" Source="shadow_10.png" /></p><p> <Image Grid.Row="2" Grid.Column="0" Stretch="Fill" Margin="0" Opacity="0.9" Source="shadow_20.png" /></p><p> <Image Grid.Row="0" Grid.Column="1" Stretch="Fill" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0" Opacity="0.9" Source="shadow_01.png" /></p><p> <Image Grid.Row="1" Grid.Column="1" Stretch="Fill" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0" Opacity="0.9" Source="shadow_11.png" /></p><p> <Image Grid.Row="2" Grid.Column="1" Stretch="Fill" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0" Opacity="0.9" Source="shadow_21.png" /></p><p> <Image Grid.Row="0" Grid.Column="2" Stretch="Fill" Margin="0" Opacity="0.9" Source="shadow_02.png" /></p><p> <Image Grid.Row="1" Grid.Column="2" Stretch="Fill" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0" Opacity="0.9" Source="shadow_12.png" /></p><p> <Image Grid.Row="2" Grid.Column="2" Stretch="Fill" Margin="0" Opacity="0.9" Source="shadow_22.png" /></p><p> </Grid></p><p> </ControlTemplate></p><p> </Setter.Value></p><p> </Setter></p><p> </Style></p><p>[/CODE]</p><p></p><p>The new styles then can be used this way:</p><p>[CODE=XML] <!-- SHADOW --></p><p> <Control Style="{ThemeResource Shadow_35_22}" /></p><p> <!-- SHADOW -->[/CODE]</p><p></p><p>I tried to remove the redundancies of grid definitions, but unfortunately I could not make it working. The "DynamicResource" is not evaluated to RowDefintion's Height property. So I have a style for each combination now <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite3" alt=":(" title="Frown :(" loading="lazy" data-shortname=":(" /></p><p>But at least I could move the duplicated inline styles into a single resource file ("widgets.xaml") now.</p></blockquote><p></p>
[QUOTE="morpheus_xx, post: 1137468, member: 48495"] [USER=145639]@ge2301[/USER] I wanted to refactor the shadow definitions and moved out the code into a resource. I checked the different combination, so that I don't accidently remove your values again ;) One question though: is it intended that there are following combinations of Margin and Row/Column Height/Widths: [LIST] [*]-3 / 18 (1x in MediaStyles.xaml) [*]-3 / 19 (2x in MediaStyles.xaml) [*]-3.5 / 22 (1x in MediaStyles.xaml + 1x MediaItemFanart.inc) [*]-3.5 / 24 (2x in MediaStyles.xaml) [*]-4 / 24 (1x in OtherControls.xaml) [/LIST] The styles looks like: [CODE=XML] <Style x:Key="Shadow_3_18"> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <Grid Margin="-3"> <Grid.ColumnDefinitions> <ColumnDefinition Width="18" /> <ColumnDefinition Width="*"/> <ColumnDefinition Width="18" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="18" /> <RowDefinition Height="*" /> <RowDefinition Height="18" /> </Grid.RowDefinitions> <Image Grid.Row="0" Grid.Column="0" Stretch="Fill" Margin="0" Opacity="0.9" Source="shadow_00.png" /> <Image Grid.Row="1" Grid.Column="0" Stretch="Fill" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0" Opacity="0.9" Source="shadow_10.png" /> <Image Grid.Row="2" Grid.Column="0" Stretch="Fill" Margin="0" Opacity="0.9" Source="shadow_20.png" /> <Image Grid.Row="0" Grid.Column="1" Stretch="Fill" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0" Opacity="0.9" Source="shadow_01.png" /> <Image Grid.Row="1" Grid.Column="1" Stretch="Fill" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0" Opacity="0.9" Source="shadow_11.png" /> <Image Grid.Row="2" Grid.Column="1" Stretch="Fill" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0" Opacity="0.9" Source="shadow_21.png" /> <Image Grid.Row="0" Grid.Column="2" Stretch="Fill" Margin="0" Opacity="0.9" Source="shadow_02.png" /> <Image Grid.Row="1" Grid.Column="2" Stretch="Fill" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0" Opacity="0.9" Source="shadow_12.png" /> <Image Grid.Row="2" Grid.Column="2" Stretch="Fill" Margin="0" Opacity="0.9" Source="shadow_22.png" /> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> [/CODE] The new styles then can be used this way: [CODE=XML] <!-- SHADOW --> <Control Style="{ThemeResource Shadow_35_22}" /> <!-- SHADOW -->[/CODE] I tried to remove the redundancies of grid definitions, but unfortunately I could not make it working. The "DynamicResource" is not evaluated to RowDefintion's Height property. So I have a style for each combination now :( But at least I could move the duplicated inline styles into a single resource file ("widgets.xaml") now. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Skins and Design
BlueVision
Blue Vision
Contact us
RSS
Top
Bottom