ConfirmationPopup
Last updated
Last updated
The template quickly creates a pop-up with the default style, similar to the examples above.
A custom pop-up can be used for unique designs but requires more work.
Template
-- The UI Document component's Source Asset property uses a UXML file. Simply drag the ConfirmationPopup.uxml file into the hierarchy of this UXML file in UI Builder.
Custom
-- The UI Document component's Source Asset property uses a UXML file. This UXML file should have a visual element you will use as ConfirmationPopup parent element. In UI Builder, set this element's name to ConfirmationPopup
.
-- Under your parent element, you need to have a Header
label, a Body
label and Decline
and Accept
buttons. You can change the look and layout of the Pop-up as you wish, add other elements etc. However, you must have these elements for the Pop-up to function.
-- For styling, either use the default ConfirmationPopup.uss file in your UXML or utilise a different USS file.
Edit ConfirmationPopup.uss file to change the default style across the project.
You can overwrite the classes utilised in ConfirmationPopup.uss in a different file to create a new look without affecting the default style .
If using a custom pop-up, it may be healthier to style independently from default styles.
Example from Main Menu UXML file
Example UI Builder Hierarchy