| |||||||
| General Talk Talk about MediaPortal 2. |
![]() |
| | LinkBack (1) | Thread Tools | Display Modes |
| | #11 (permalink) |
| Portal Member | heh, browsing through the code. got it to work and all. Nice work! This confuses me though: SkinEngine.Controls.Button inherits from Control SkinEngine.Controls.Visual.Button inherits from Border(why not ContentControl?) which inherits from FrameWorkElement. Itīs the Visual Button that gets rendered right? But what does the other one do? And how are they connected? It can be repeated again: great work! |
| | |
| | #12 (permalink) |
| Portal Developer Join Date: Apr 2004 Location: The Netherlands Age: 36
Posts: 1,513
Thanks: 3
Thanked 119 Times in 44 Posts
Country: | You're right Since a Button has a Template which defines how it should render itself i think we can simple inherit Button from FrameWorkElement directly |
| | |
| | #13 (permalink) | |
| Portal Member | Quote:
Like this one: Code: <StackPanel>
<StackPanel.Resources>
<ControlTemplate x:Key="MyButtStyle" TargetType="{x:Type Button}">
<Border
x:Name="PART_border"
Background="SlateGray"
BorderBrush="Black"
BorderThickness="1"
CornerRadius="5">
<ContentPresenter/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="PART_border" Property="Background" Value="#FF8CB2BD"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="PART_border" Property="Background" Value="#FF154451"/>
<Setter Property="Foreground" Value="White" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</StackPanel.Resources>
<Button Width="100" Height="75" Template="{StaticResource MyButtStyle}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Source="http://www.freeiconsweb.com/Freeicons/256x256_Transparent_Icons2/27.png"/>
<TextBlock Grid.Column="1" VerticalAlignment="Center" Text="Home"/>
</Grid>
</Button>
<Button Width="100" Height="75" Template="{StaticResource MyButtStyle}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Source="http://www.freeiconsweb.com/Freeicons/256x256_Transparent_Icons2/35.png"/>
<TextBlock Grid.Column="1" VerticalAlignment="Center" Text="Away"/>
</Grid>
</Button>
</StackPanel>
Both buttons use the same template but have different content. If they donīt inherit from ContentControl They would have had to have two templates, since the images differ between the Buttons? Oooor I might just be tired.... ![]() Edit: Off course one could implement a new "Content" property. But in wpf there are quite many controls that derive from ContentControl such as ListViewItem, HeaderedItemsControl and so on. The later would be great for creating dialogs and such. Last edited by bedlam; 2008-01-06 at 18:57. Reason: added code tags | |
| | |
| This User Say Thank You: |
| | #15 (permalink) |
| Portal Member | Are you skipping the whole Attached/DependencyProperty-thing or are you planning on another equally flexible system for "distributed" properties? And if you are skipping them, wouldnīt this be a deal-breaker? If someone wanted to implement a... RadialPanel after "v1". The developer would need to make changes into UIElement,adding a property such as "Angle". Which is kind of..wrong right? When instantiating a FrameWorkElement via XAML it should be able to register a property such as RadialPanel.Angle and add to its own internal collection of DependencyProperties. this would then result in the whole Get/SetValue()-deal which many new WPF developers have abit of a struggle with, but provide much of WPFs renowned flexibility, extensibility and layout. But perhaps what Iīve seen is temporary code, Itīs hard to know! Sorry if Iīm abit "Submit Reply"-happy here but Iīm just really psyched about this! ![]() |
| | |
| | #16 (permalink) |
| Project Coordinator Join Date: Dec 2004 Location: 127.0.0.1 Age: 28
Posts: 5,718
Thanks: 131
Thanked 94 Times in 65 Posts
Country: | the whole thing is WIP, means -> not finished. just to let you know ![]()
__________________ regards chris MediaPortal Project Coordinator Test Team Leader Do not start to moan if something is not working as you want it to be. Remember that MediaPortal is Open Source. YOU can improve it! |
| | |
| | #17 (permalink) | |
| Portal Developer Join Date: Apr 2004 Location: The Netherlands Age: 36
Posts: 1,513
Thanks: 3
Thanked 119 Times in 44 Posts
Country: | Quote:
Yes we have dependency properties, but they are implemented differently from WPF If someone wants to add a RadialPanel after v1.0, he can implement that class, derive it from FrameWorkElement and put the dependency properties specific for this new RadialPanel in the RadialPanel class Note that any new properties will be automaticly detected & handled by the xaml parser. So without changing the core skinengine you can add new controls and new dependency properties to your own new controls Frodo | |
| | |
| | #18 (permalink) | |||
| Portal Member | [quote=infinityloop] Quote:
![]() Quote:
![]() Even so, it still confuses me that UIElement has these kinds of properties defined: Dock, Row, Column, rowspan and so on. Well, Iīll just have to have a look at the xamlreader(or whatever itīs called) code then. | |||
| | |
| | #19 (permalink) |
| Portal Member | Can I assume it's possible then to have both raster and vector elements as animated elements? and if so....both onscreen at the same time, and what sort of performance hit would that be. you could pull off some amazing things with that kind of freedom.
__________________ "an object at rest...cannot be stopped!" |
| | |
| | #20 (permalink) | ||
| Portal Developer Join Date: Apr 2004 Location: The Netherlands Age: 36
Posts: 1,513
Thanks: 3
Thanked 119 Times in 44 Posts
Country: | Quote:
Quote:
- on the GFX card you have, (the faster the better) - the kind of animation(s) - the resolution of the object you are animation - the resolution you run MP-II (offcourse 720x576 will requires less CPU/GPU then 1920x1080) However we do try to reach the same performance as WPF and better Frodo | ||
| | |
![]() |
| Bookmarks |
| Tags |
| opensource, skinengine, xaml |
| Thread Tools | |
| Display Modes | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://forum.team-mediaportal.com/general-talk-235/mediaportal-ii-gets-opensource-xaml-skinengine-33224/ | ||||
| Posted By | For | Type | Date | |
| Two Great WPF Video Samples Online | IRhetoric: Convergence in the Simulacrum! | This thread | Refback | 2008-07-22 15:20 | |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MediaPortal II - Release/Roadmap/Planning | James | General Talk | 25 | 2008-08-07 14:04 |
| Announcement: MediaPortal II | infinityloop | General Talk | 218 | 2008-03-07 14:41 |
| Mediaportal-II Infinity released | frodo | General Talk | 33 | 2008-01-07 18:06 |
| Digi Vox II Problem mit Mediaportal | hansen20041 | Media Portal - Support | 3 | 2006-10-30 14:15 |