public OnboardingElement(FrameworkElement target, OnboardingStage stage) { Title = ResourceHelper.GetText($"OnboardingStage{stage}Title"); Subtitle = ResourceHelper.GetText($"OnboardingStage{stage}Description"); Target = target; Stage = stage; }
/// <summary> /// Converts a OnboardingStage value to a corresponding string value /// </summary> /// <param name="enumValue">The OnboardingStage value to convert</param> /// <returns>The representative string value</returns> public static string ToValue(OnboardingStage enumValue) { switch (enumValue) { //only valid enum elements can be used //this is necessary to avoid errors case OnboardingStage.ONBOARDING_REQUEST_SUBMITTED: case OnboardingStage.ONBOARDING_COMPLETE: case OnboardingStage.ONBOARDING_REJECTED: return(StringValues[(int)enumValue]); //an invalid enum value was requested default: return(null); } }