Why not just use the definition of confidence interval?
You seek an upper confidence limit for $\theta$, say with $1-\alpha$ coverage. Because this is tantamount to estimating a scale and $X_n$ is your test statistic, you should seek a UCL of the form $cX_n$ for some universal constant $c$. All this means (by definition) is that
$$1-\alpha = {\Pr}_\theta[c X_n \ge \theta] = {\Pr}_\theta[X_n \ge \theta/c] = 1-\left(\frac{1}{c}\right)^n.$$
The solution is $c = \alpha^{-1/n}$.
Interestingly, a lower confidence limit for $\theta$ can be found in the same way, in the form LCL = $b X_n$ with $b = (1-\alpha)^{-1/n}$. This confidence interval never contains $\hat{\theta} = X_n$!
For example, suppose $n=10$ and we seek a (symmetric) two-sided 95% confidence interval, so that $\alpha = 0.025$. Thus $c=1.446126$ and $b=1.002535$: we have 95% confidence that the limit of the underlying uniform distribution, $\theta$, lies between 1.446 and 1.003 times the largest of 10 iid draws from that distribution.
As a test (in R):
# Specify the confidence.
alpha <- 1 - 0.95
# Create simulated values.
n <- 10 # Number of iid draws per trial
nTrials <- 10000 # Number of trials
theta <- 1 # Parameter (positive; its value doesn't matter)
set.seed(17)
x <- runif(n*nTrials, max=theta) # The data
xn <- apply(matrix(x, nrow=n), 2, max) # The test statistics
# Compute the coverage of the simulated intervals.
ucl.k <- (alpha/2)^(-1/n)
lcl.k <- (1-alpha/2)^(-1/n)
length(xn[lcl.k * xn <= theta & theta <= ucl.k * xn]) / nTrials
This (reproducible) example yields 95.05%, as close as one can hope to the nominal coverage of 95%.