-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
…of how to implement custom binding and collection binding to ListView
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
@import url("unity-theme://default"); | ||
|
||
@import url("/Assets/com.bustedbunny.mvvmtoolkit/Runtime/Resources/MVVMTKDefault.uss"); | ||
@import url("TooltipStyles.uss"); | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using CommunityToolkit.Mvvm.Messaging; | ||
using MVVMToolkit; | ||
|
||
namespace SampleView.CollectionView | ||
{ | ||
public class CollectionViewView : BaseView, IRecipient<OpenCollectionViewMessage> | ||
{ | ||
public void Receive(OpenCollectionViewMessage message) | ||
{ | ||
enabled = true; | ||
} | ||
} | ||
|
||
public class OpenCollectionViewMessage { } | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.template-container { | ||
flex-grow: 1; | ||
flex-direction: row; | ||
} | ||
|
||
.template-element { | ||
height: 100%; | ||
flex-grow: 1; | ||
} | ||
|
||
.template-flag { | ||
height: 100%; | ||
width: 100px; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" | ||
xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" | ||
noNamespaceSchemaLocation="../UIElementsSchema/UIElements.xsd" editor-extension-mode="False"> | ||
<Style src="project://database/Assets/SampleView/Views/CollectionView/CollectionView.uss?fileID=7433441132597879392&guid=c3aff912b80f6d443b99129233e4d24d&type=3#CollectionView"/> | ||
<ui:VisualElement style="flex-grow: 1; background-color: rgb(185, 185, 185);"> | ||
<ui:Button text="Back to TestView" view-data-key="{@OpenTestView}"/> | ||
|
||
<ui:ListView view-data-key="{~Collection:Template} {*CollectionViewBinder}" | ||
virtualization-method="DynamicHeight" style="font-size: 42px; align-items: flex-start;"/> | ||
<MVVMToolkit.DataTemplate name="Template"> | ||
<ui:VisualElement class="template template-container"> | ||
<ui:Label view-data-key="{:LabelBinder}" class="template template-element"/> | ||
<ui:VisualElement view-data-key="{:ImageBinder}" class="template template-flag"/> | ||
</ui:VisualElement> | ||
</MVVMToolkit.DataTemplate> | ||
</ui:VisualElement> | ||
</ui:UXML> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.